mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-06 21:49:03 +00:00
removed js insert, css insert moved to tweaks mod
This commit is contained in:
parent
28bb0663d4
commit
cb4aad5ba0
@ -6,6 +6,7 @@
|
||||
- improved: new larger menu layout, with individual mod pages.
|
||||
- improved: merged bracketed-links into tweaks.
|
||||
- removed: integrated scrollbar tweak (notion now includes by default).
|
||||
- removed: js insert. css insert moved to tweaks mod.
|
||||
|
||||
#### todo
|
||||
|
||||
|
@ -1,25 +0,0 @@
|
||||
/*
|
||||
* notion-enhancer: custom-inserts
|
||||
* (c) 2021 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
|
||||
* (https://notion-enhancer.github.io/) under the MIT license
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const _id = 'b4b0aced-2059-43bf-8d1d-ccd757ee5ebb';
|
||||
import { env, storage, web } from '../../api.js';
|
||||
|
||||
const inserts = {
|
||||
js: await storage.get(_id, '_file.js'),
|
||||
css: await storage.get(_id, '_file.css'),
|
||||
};
|
||||
|
||||
if (inserts.js) {
|
||||
// eval(inserts.js);
|
||||
}
|
||||
|
||||
if (inserts.css) {
|
||||
document.body.append(
|
||||
web.createElement(web.html`<style id="custom-inserts@${_id}.css">${inserts.css}</style>`)
|
||||
);
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
{
|
||||
"name": "custom-inserts",
|
||||
"id": "b4b0aced-2059-43bf-8d1d-ccd757ee5ebb",
|
||||
"version": "0.2.0",
|
||||
"description": "link files for small client-side tweaks.",
|
||||
"tags": ["extension", "customisation"],
|
||||
"authors": [
|
||||
{
|
||||
"name": "dragonwocky",
|
||||
"email": "thedragonring.bod@gmail.com",
|
||||
"url": "https://dragonwocky.me/",
|
||||
"icon": "https://dragonwocky.me/avatar.jpg"
|
||||
}
|
||||
],
|
||||
"js": {
|
||||
"client": ["client.js"]
|
||||
},
|
||||
"options": [
|
||||
{
|
||||
"type": "file",
|
||||
"key": "css",
|
||||
"label": "css insert",
|
||||
"extensions": [".css"]
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"key": "js",
|
||||
"label": "client js insert",
|
||||
"extensions": [".js"]
|
||||
}
|
||||
]
|
||||
}
|
@ -407,12 +407,6 @@ label [data-icon='fa/question-circle'] {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
/* is this weird? absolutely. but intentional. cos i wanted markdown __underline__ */
|
||||
strong {
|
||||
text-decoration: underline;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
position: absolute;
|
||||
background: var(--theme--tooltip);
|
||||
|
@ -1,6 +1,5 @@
|
||||
[
|
||||
"menu@a6621988-551d-495a-97d8-3c568bca2e9e",
|
||||
"theming@0f0bf8b6-eae6-4273-b307-8fc43f2ee082",
|
||||
"custom-inserts@b4b0aced-2059-43bf-8d1d-ccd757ee5ebb",
|
||||
"tweaks@5174a483-c88d-4bf8-a95f-35cd330b76e2"
|
||||
]
|
||||
|
@ -10,6 +10,17 @@ const _id = '5174a483-c88d-4bf8-a95f-35cd330b76e2';
|
||||
import { env, storage, web } from '../../api.js';
|
||||
|
||||
web.whenReady().then(async () => {
|
||||
const cssInsert = await storage.get(_id, '_file.insert.css');
|
||||
if (cssInsert) {
|
||||
document.body.append(
|
||||
web.createElement(
|
||||
web.html`<style id="${await storage.get(_id, 'insert.css')}@${_id}">
|
||||
${cssInsert}
|
||||
</style>`
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (['linux', 'win32'].includes(env.name)) {
|
||||
// dragarea_height
|
||||
}
|
||||
@ -31,7 +42,6 @@ web.whenReady().then(async () => {
|
||||
const responsiveBreakpoint = await storage.get(_id, 'tweak.responsive_breakpoint'),
|
||||
addResponsiveBreakpoint = () => {
|
||||
document.body.classList.remove('tweak--responsive_breakpoint');
|
||||
console.log(window.outerWidth, responsiveBreakpoint);
|
||||
if (window.innerWidth <= responsiveBreakpoint) {
|
||||
document.body.classList.add('tweak--responsive_breakpoint');
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "tweaks",
|
||||
"id": "5174a483-c88d-4bf8-a95f-35cd330b76e2",
|
||||
"version": "0.2.0",
|
||||
"description": "common style/layout changes.",
|
||||
"description": "common style/layout changes and custom inserts.",
|
||||
"tags": ["extension", "customisation"],
|
||||
"authors": [
|
||||
{
|
||||
@ -19,6 +19,12 @@
|
||||
"client": ["client.js"]
|
||||
},
|
||||
"options": [
|
||||
{
|
||||
"type": "file",
|
||||
"key": "insert.css",
|
||||
"label": "css insert",
|
||||
"extensions": [".css"]
|
||||
},
|
||||
{
|
||||
"key": "tweak.dragarea_height",
|
||||
"label": "height of frameless dragarea:",
|
||||
|
Loading…
Reference in New Issue
Block a user