From 5bb8b5f3fccd44d95e59c8f33da58dc6dcb4ce15 Mon Sep 17 00:00:00 2001 From: dragonwocky Date: Mon, 27 Sep 2021 16:32:27 +1000 Subject: [PATCH] improved registry validation + methods, prep for profiles --- extension/CHANGELOG.md | 11 +- extension/api/_.mjs | 8 +- extension/api/env.mjs | 6 - extension/api/registry.mjs | 511 ++++++++---------- extension/api/storage.mjs | 15 + extension/api/{regex.mjs => validation.mjs} | 54 +- extension/api/web.mjs | 2 +- extension/repo/CHANGELOG.md | 366 ------------- .../{client.js => client.mjs} | 0 .../mod.json | 12 +- .../{client.js => client.mjs} | 0 .../mod.json | 12 +- .../{client.js => client.mjs} | 0 .../menu.js | 2 +- .../mod.json | 7 +- .../{client.js => client.mjs} | 0 .../mod.json | 12 +- .../{client.js => client.mjs} | 0 .../mod.json | 7 +- 19 files changed, 333 insertions(+), 692 deletions(-) rename extension/api/{regex.mjs => validation.mjs} (55%) delete mode 100644 extension/repo/CHANGELOG.md rename extension/repo/bypass-preview@cb6fd684-f113-4a7a-9423-8f0f0cff069f/{client.js => client.mjs} (100%) rename extension/repo/calendar-scroll@b1c7db33-dfee-489a-a76c-0dd66f7ed29a/{client.js => client.mjs} (100%) rename extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/{client.js => client.mjs} (100%) rename extension/repo/theming@0f0bf8b6-eae6-4273-b307-8fc43f2ee082/{client.js => client.mjs} (100%) rename extension/repo/tweaks@5174a483-c88d-4bf8-a95f-35cd330b76e2/{client.js => client.mjs} (100%) diff --git a/extension/CHANGELOG.md b/extension/CHANGELOG.md index 357c0a4..48aec82 100644 --- a/extension/CHANGELOG.md +++ b/extension/CHANGELOG.md @@ -7,11 +7,18 @@ a complete rework of the enhancer including a port to the browser as a chrome ex - new: cross-environment and properly documented api to replace helpers. - new: cross-environment mod loader structure. - new: notifications sourced from an online endpoint for sending global user alerts. -- improved: a redesigned menu with a better overview of all mods and separate pages for options and documentation. +- new: simplify user installs by depending on the chrome web store and [notion-repackaged](https://github.com/notion-enhancer/notion-repackaged). +- improved: split the core mod into the theming & menu mods. - improved: theming variables that are more specific, less laggy, and less complicated. +- improved: merged bracketed-links into tweaks. +- removed: integrated scrollbar tweak (notion now includes by default). +- removed: js insert. css insert moved to tweaks mod. +- removed: majority of layout and font size variables - better to leave former to notion and use `ctrl +` for latter. +- bugfix: bypass csp restrictions. -// todo +#### todo +- improved: a redesigned menu with a better overview of all mods. - new: separate menu profiles for mod configurations. **below this point the enhancer was desktop-only. in v0.11.0 it was been ported to also** diff --git a/extension/api/_.mjs b/extension/api/_.mjs index 60c0556..9f48011 100644 --- a/extension/api/_.mjs +++ b/extension/api/_.mjs @@ -14,9 +14,11 @@ export * as env from './env.mjs'; export * as fmt from './fmt.mjs'; /** environment-specific filesystem reading */ export * as fs from './fs.mjs'; -/** pattern validators */ -export * as regex from './regex.mjs'; /** interactions with the enhancer's repository of mods */ -// export * as registry from './registry.mjs'; +export * as registry from './registry.mjs'; /** environment-specific data persistence */ export * as storage from './storage.mjs'; +/** pattern and type validators */ +export * as validation from './validation.mjs'; +/** helpers for manipulation of a webpage */ +export * as web from './web.mjs'; diff --git a/extension/api/env.mjs b/extension/api/env.mjs index 62037c8..ce7ef28 100644 --- a/extension/api/env.mjs +++ b/extension/api/env.mjs @@ -11,12 +11,6 @@ * @module notion-enhancer/api/env */ -/** - * an error constant used in validation, distinct from null or undefined - * @constant {Symbol} - */ -export const ERROR = Symbol(); - /** * the environment/platform name code is currently being executed in * @constant {string} diff --git a/extension/api/registry.mjs b/extension/api/registry.mjs index a884850..c2d7efb 100644 --- a/extension/api/registry.mjs +++ b/extension/api/registry.mjs @@ -11,321 +11,231 @@ * @module notion-enhancer/api/registry */ -import * as regex from './regex.mjs'; +import * as env from './env.mjs'; +import { getJSON } from './fs.mjs'; +import * as storage from './storage.mjs'; +import { is } from './validation.mjs'; + +const _cache = [], + _errors = []; /** mod ids whitelisted as part of the enhancer's core, permanently enabled */ -export const CORE = [ +export const core = [ 'a6621988-551d-495a-97d8-3c568bca2e9e', '0f0bf8b6-eae6-4273-b307-8fc43f2ee082', ]; +/** all available configuration types */ +export const optionTypes = ['toggle', 'select', 'text', 'number', 'color', 'file']; + /** * internally used to validate mod.json files and provide helpful errors * @private * @param {object} mod - a mod's mod.json in object form - * @param {*} err - a callback to execute if a test fails - * @param {*} check - a function to test a condition - * @returns {array} the results of the validation + * @returns {boolean} whether or not the mod has passed validation */ -registry.validate = async (mod, err, check) => { +async function validate(mod) { + const check = async ( + key, + value, + type, + { + extension = '', + error = `invalid ${key} (${extension ? `${extension} ` : ''}${type}): ${JSON.stringify( + value + )}`, + optional = false, + } = {} + ) => { + const test = await is(type === 'file' ? `repo/${mod._dir}/${value}` : value, type, { + extension, + }); + if (!test) { + if (optional && (await is(value, 'undefined'))) return true; + if (error) _errors.push({ source: mod._dir, message: error }); + return false; + } + return true; + }; let conditions = [ - check('name', mod.name, typeof mod.name === 'string'), - check('id', mod.id, typeof mod.id === 'string').then((id) => - id === env.ERROR ? env.ERROR : regex.uuid(id, err) + check('name', mod.name, 'string'), + check('id', mod.id, 'uuid'), + check('version', mod.version, 'semver'), + check('environments', mod.environments, 'array').then((passed) => + passed ? mod.environments.map((tag) => check('environments.env', tag, 'env')) : 0 ), - check('version', mod.version, typeof mod.version === 'string').then((version) => - version === env.ERROR ? env.ERROR : regex.semver(version, err) + check('description', mod.description, 'string'), + // file doubles for url here + check('preview', mod.preview, 'file', { optional: true }), + check('tags', mod.tags, 'array').then((passed) => + passed ? mod.tags.map((tag) => check('tags.tag', tag, 'string')) : 0 ), - check('description', mod.description, typeof mod.description === 'string'), - check( - 'preview', - mod.preview, - mod.preview === undefined || typeof mod.preview === 'string' - ).then((preview) => - preview ? (preview === env.ERROR ? env.ERROR : regex.url(preview, err)) : undefined - ), - check('tags', mod.tags, Array.isArray(mod.tags)).then((tags) => - tags === env.ERROR - ? env.ERROR - : tags.map((tag) => check('tag', tag, typeof tag === 'string')) - ), - check('authors', mod.authors, Array.isArray(mod.authors)).then((authors) => - authors === env.ERROR - ? env.ERROR - : authors.map((author) => [ - check('author.name', author.name, typeof author.name === 'string'), - check('author.email', author.email, typeof author.email === 'string').then( - (email) => (email === env.ERROR ? env.ERROR : regex.email(email, err)) - ), - check('author.url', author.url, typeof author.url === 'string').then((url) => - url === env.ERROR ? env.ERROR : regex.url(url, err) - ), - check('author.icon', author.icon, typeof author.icon === 'string').then((icon) => - icon === env.ERROR ? env.ERROR : regex.url(icon, err) - ), - ]) - ), - check( - 'environments', - mod.environments, - !mod.environments || Array.isArray(mod.environments) - ).then((environments) => - environments - ? environments === env.ERROR - ? env.ERROR - : environments.map((environment) => - check('environment', environment, env.supported.includes(environment)) - ) - : undefined - ), - check( - 'css', - mod.css, - mod.css && typeof mod.css === 'object' && !Array.isArray(mod.css) - ).then((css) => - css - ? css === env.ERROR - ? env.ERROR - : ['frame', 'client', 'menu'] - .filter((dest) => css[dest]) - .map(async (dest) => - check(`css.${dest}`, css[dest], Array.isArray(css[dest])).then((files) => - files === env.ERROR - ? env.ERROR - : files.map(async (file) => - check( - `css.${dest} file`, - file, - await fs.isFile(`repo/${mod._dir}/${file}`, '.css') - ) - ) - ) - ) - : undefined - ), - check('js', mod.js, mod.js && typeof mod.js === 'object' && !Array.isArray(mod.js)).then( - async (js) => { - if (js === env.ERROR) return env.ERROR; - if (!js) return undefined; - return [ - check('js.client', js.client, !js.client || Array.isArray(js.client)).then( - (client) => { - if (client === env.ERROR) return env.ERROR; - if (!client) return undefined; - return client.map(async (file) => - check( - 'js.client file', - file, - await fs.isFile(`repo/${mod._dir}/${file}`, '.js') - ) - ); - } - ), - check('js.electron', js.electron, !js.electron || Array.isArray(js.electron)).then( - (electron) => { - if (electron === env.ERROR) return env.ERROR; - if (!electron) return undefined; - return electron.map((file) => - check( - 'js.electron file', - file, - file && typeof file === 'object' && !Array.isArray(file) - ).then(async (file) => - file === env.ERROR - ? env.ERROR - : [ - check( - 'js.electron file source', - file.source, - await fs.isFile(`repo/${mod._dir}/${file.source}`, '.js') - ), - // referencing the file within the electron app - // existence can't be validated, so only format is - check( - 'js.electron file target', - file.target, - typeof file.target === 'string' && file.target.endsWith('.js') - ), - ] - ) - ); - } - ), - ]; + check('authors', mod.authors, 'array').then((passed) => { + if (!passed) return false; + return mod.authors.map((author) => [ + check('authors.author.name', author.name, 'string'), + check('authors.author.email', author.email, 'email'), + check('authors.author.homepage', author.homepage, 'url'), + check('authors.author.avatar', author.avatar, 'url'), + ]); + }), + check('css', mod.css, 'object').then((passed) => { + if (!passed) return false; + const tests = []; + for (let dest of ['frame', 'client', 'menu']) { + if (!mod.css[dest]) continue; + let test = check(`css.${dest}`, mod.css[dest], 'array'); + test = test.then((passed) => { + if (!passed) return false; + return mod.css[dest].map((file) => + check(`css.${dest}.file`, file, 'file', { extension: '.css' }) + ); + }); + tests.push(test); } - ), - check('options', mod.options, Array.isArray(mod.options)).then((options) => - options === env.ERROR - ? env.ERROR - : options.map((option) => { - const conditions = []; - switch (option.type) { - case 'toggle': - conditions.push( - check('option.value', option.value, typeof option.value === 'boolean') - ); - break; - case 'select': - conditions.push( - check('option.values', option.values, Array.isArray(option.values)).then( - (value) => - value === env.ERROR - ? env.ERROR - : value.map((option) => - check('option.values option', option, typeof option === 'string') - ) - ) - ); - break; - case 'text': - conditions.push( - check('option.value', option.value, typeof option.value === 'string') - ); - break; - case 'number': - conditions.push( - check('option.value', option.value, typeof option.value === 'number') - ); - break; - case 'color': - conditions.push( - check('option.value', option.value, typeof option.value === 'string').then( - (color) => (color === env.ERROR ? env.ERROR : regex.color(color, err)) - ) - ); - break; - case 'file': - conditions.push( - check( - 'option.extensions', - option.extensions, - !option.extensions || Array.isArray(option.extensions) - ).then((extensions) => - extensions - ? extensions === env.ERROR - ? env.ERROR - : extensions.map((ext) => - check('option.extension', ext, typeof ext === 'string') - ) - : undefined - ) - ); - break; - default: - return check('option.type', option.type, false); - } - return [ - conditions, - check( - 'option.key', - option.key, - typeof option.key === 'string' && !option.key.match(/\s/) - ), - check('option.label', option.label, typeof option.label === 'string'), - check( - 'option.tooltip', - option.tooltip, - !option.tooltip || typeof option.tooltip === 'string' - ), - check( - 'option.environments', - option.environments, - !option.environments || Array.isArray(option.environments) - ).then((environments) => - environments - ? environments === env.ERROR - ? env.ERROR - : environments.map((environment) => - check( - 'option.environment', - environment, - env.supported.includes(environment) - ) - ) - : undefined - ), - ]; - }) - ), + return tests; + }), + check('js', mod.js, 'object').then((passed) => { + if (!passed) return false; + const tests = []; + if (mod.js.client) { + let test = check('js.client', mod.js.client, 'array'); + test = test.then((passed) => { + if (!passed) return false; + return mod.js.client.map((file) => + check('js.client.file', file, 'file', { extension: '.mjs' }) + ); + }); + tests.push(test); + } + if (mod.js.electron) { + let test = check('js.electron', mod.js.electron, 'array'); + test = test.then((passed) => { + if (!passed) return false; + return mod.js.electron.map((file) => + check('js.electron.file', file, 'object').then((passed) => { + if (!passed) return false; + return [ + check('js.electron.file.source', file.source, 'file', { + extension: '.mjs', + }), + // referencing the file within the electron app + // existence can't be validated, so only format is + check('js.electron.file.target', file.target, 'string', { + extension: '.js', + }), + ]; + }) + ); + }); + tests.push(test); + } + return tests; + }), + check('options', mod.options, 'array').then((passed) => { + if (!passed) return false; + return mod.options.map((option) => + check('options.option.type', option.type, 'optionType').then((passed) => { + if (!passed) return false; + const tests = [ + check('options.option.key', option.key, 'alphanumeric'), + check('options.option.label', option.label, 'string'), + check('options.option.tooltip', option.tooltip, 'string', { + optional: true, + }), + check('options.option.environments', option.environments, 'array', { + optional: true, + }).then((passed) => { + if (!passed) return false; + if (!option.environments) { + option.environments = env.supported; + return true; + } + return option.environments.map((env) => + check('options.option.environments.env', env, 'env') + ); + }), + ]; + switch (option.type) { + case 'toggle': + tests.push(check('options.option.value', option.value, 'boolean')); + break; + case 'select': + tests.push( + check('options.option.values', option.values, 'array').then((passed) => { + if (!passed) return false; + return option.values.map((value) => + check('options.option.values.value', value, 'string') + ); + }) + ); + break; + case 'text': + tests.push(check('options.option.value', option.value, 'string')); + break; + case 'number': + case 'color': + tests.push(check('options.option.value', option.value, option.type)); + break; + case 'file': + tests.push( + check('options.option.extensions', option.extensions, 'array').then( + (passed) => { + if (!passed) return false; + return option.extensions.map((value) => + check('options.option.extensions.extension', value, 'string') + ); + } + ) + ); + } + return tests; + }) + ); + }), ]; do { conditions = await Promise.all(conditions.flat(Infinity)); } while (conditions.some((condition) => Array.isArray(condition))); - return conditions; -}; + return conditions.every((passed) => passed); +} /** - * get the default values of a mod's options according to its mod.json - * @param {string} id - the uuid of the mod - * @returns {object} the mod's default values + * list all available mods in the repo + * @returns {array} a validated list of mod.json objects */ -export const defaults = async (id) => { - const mod = regex.uuid(id) ? (await registry.get()).find((mod) => mod.id === id) : undefined; - if (!mod || !mod.options) return {}; - const defaults = {}; - for (const opt of mod.options) { - switch (opt.type) { - case 'toggle': - case 'text': - case 'number': - case 'color': - defaults[opt.key] = opt.value; - break; - case 'select': - defaults[opt.key] = opt.values[0]; - break; - case 'file': - defaults[opt.key] = undefined; - break; - } - } - return defaults; -}; - -/** - * get all available mods in the repo - * @param {function} filter - a function to filter out mods - * @returns {array} the filtered and validated list of mod.json objects - * @example - * // will only get mods that are enabled in the current environment - * await registry.get((mod) => registry.isEnabled(mod.id)) - */ -export const get = async (filter = (mod) => true) => { - if (!registry._errors) registry._errors = []; - if (!registry._list || !registry._list.length) { - registry._list = []; - for (const dir of await fs.getJSON('repo/registry.json')) { - const err = (message) => [registry._errors.push({ source: dir, message }), env.ERROR][1]; +export const list = async () => { + if (!_cache.length) { + for (const dir of await getJSON('repo/registry.json')) { try { - const mod = await fs.getJSON(`repo/${dir}/mod.json`); + const mod = await getJSON(`repo/${dir}/mod.json`); mod._dir = dir; - mod.tags = mod.tags ?? []; - mod.css = mod.css ?? {}; - mod.js = mod.js ?? {}; - mod.options = mod.options ?? []; - const check = (prop, value, condition) => - Promise.resolve( - condition ? value : err(`invalid ${prop} ${JSON.stringify(value)}`) - ), - validation = await registry.validate(mod, err, check); - if (validation.every((condition) => condition !== env.ERROR)) registry._list.push(mod); + if (await validate(mod)) _cache.push(mod); } catch { - err('invalid mod.json'); + _errors.push({ source: dir, message: 'invalid mod.json' }); } } } - const list = []; - for (const mod of registry._list) if (await filter(mod)) list.push(mod); - return list; + return _cache; }; /** - * gets a list of errors encountered while validating the mod.json files - * @returns {object} - {source: directory, message: string } + * list validation errors encountered when loading the repo + * @returns {array} error objects with an error message and a source directory */ -registry.errors = async () => { - if (!registry._errors) await registry.get(); - return registry._errors; +export const errors = async () => { + if (!_errors.length) await list(); + return _errors; +}; + +/** + * get a single mod from the repo + * @param {string} id - the uuid of the mod + * @returns {object} the mod's mod.json + */ +export const get = async (id) => { + if (!_cache.length) await list(); + return _cache.find((mod) => mod.id === id); }; /** @@ -334,9 +244,34 @@ registry.errors = async () => { * @param {string} id - the uuid of the mod * @returns {boolean} whether or not the mod is enabled */ -registry.isEnabled = async (id) => { - const mod = (await registry.get()).find((mod) => mod.id === id); - if (mod.environments && !mod.environments.includes(env.name)) return false; - if (registry.CORE.includes(id)) return true; - return await storage.get('_mods', id, false); +export const enabled = async (id) => { + const mod = await get(id); + if (!mod.environments.includes(env.name)) return false; + if (core.includes(id)) return true; + return await storage.get( + ['profiles', await storage.get(['currentprofile'], 'default'), '_mods', id], + false + ); +}; + +/** + * get a default value of a mod's option according to its mod.json + * @param {string} id - the uuid of the mod + * @param {string} key - the key of the option + * @returns {string|number|boolean|undefined} the option's default value + */ +export const optionDefault = async (id, key) => { + const mod = await get(id), + opt = mod.options.find((opt) => opt.key === key); + switch (opt.type) { + case 'toggle': + case 'text': + case 'number': + case 'color': + return opt.value; + case 'select': + return opt.values[0]; + case 'file': + } + return undefined; }; diff --git a/extension/api/storage.mjs b/extension/api/storage.mjs index 6778845..0be7681 100644 --- a/extension/api/storage.mjs +++ b/extension/api/storage.mjs @@ -42,6 +42,7 @@ export const get = (path, fallback = undefined) => { * persist data * @param {array} path - the path of keys to the value being set * @param {*} value - the data to save + * @returns {Promise} resolves when data has been saved */ export const set = (path, value) => { if (!path.length) return undefined; @@ -78,6 +79,20 @@ export const set = (path, value) => { return interaction; }; +/** + * create a wrapper for accessing a partition of the storage + * @param {array} namespace - the path of keys to prefix all storage requests with + * @param {Function} [get] - the storage get function to be wrapped + * @param {Function} [set] - the storage set function to be wrapped + * @returns {object} an object with the wrapped get/set functions + */ +export const db = (namespace, get = get, set = set) => { + return { + get: (path, fallback = undefined) => get([namespace, ...path], fallback), + set: (path, value) => set([namespace, ...path], value), + }; +}; + /** * add an event listener for changes in storage * @param {onStorageChangeCallback} callback - called whenever a change in diff --git a/extension/api/regex.mjs b/extension/api/validation.mjs similarity index 55% rename from extension/api/regex.mjs rename to extension/api/validation.mjs index 3ea1545..90c29be 100644 --- a/extension/api/regex.mjs +++ b/extension/api/validation.mjs @@ -7,11 +7,16 @@ 'use strict'; /** - * pattern validators - * @module notion-enhancer/api/regex + * pattern and type validators + * @module notion-enhancer/api/validation */ +import { supported } from './env.mjs'; +import { optionTypes } from './registry.mjs'; +import { isFile } from './fs.mjs'; + const patterns = { + alphanumeric: /^[\w\.-]+$/, uuid: /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, semver: /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/i, @@ -20,12 +25,18 @@ const patterns = { url: /^[(http(s)?):\/\/(www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/i, color: /^(?:#|0x)(?:[a-f0-9]{3}|[a-f0-9]{6})\b|(?:rgb|hsl)a?\([^\)]*\)$/i, }; - function test(str, pattern) { const match = str.match(pattern); - return match && match.length; + return !!(match && match.length); } +/** + * check is string is alphanumeric-only (letters, numbers, underscores, dots, dashes) + * @param {string} str - the string to test + * @returns {boolean} whether or not the test passed successfully + */ +export const alphanumeric = (str) => test(str, patterns.alphanumeric); + /** * check for a valid uuid (8-4-4-4-12 hexadecimal digits) * @param {string} str - the string to test @@ -60,3 +71,38 @@ export const url = (str) => test(str, patterns.url); * @returns {boolean} whether or not the test passed successfully */ export const color = (str) => test(str, patterns.color); + +/** + * test the type of a value. unifies builtin, regex, and environment/api checks. + * @param {*} value - the value to check + * @param {string} type - the type the value should be + * @returns {boolean} whether or not the value matches the type + */ +export const is = async (value, type, { extension = '' } = {}) => { + extension = !value || !value.endsWith || value.endsWith(extension); + switch (type) { + case 'array': + return Array.isArray(value); + case 'object': + return value && typeof value === 'object' && !Array.isArray(value); + case 'undefined': + case 'boolean': + case 'number': + case 'string': + return typeof value === type && extension; + case 'alphanumeric': + case 'uuid': + case 'semver': + case 'email': + case 'url': + case 'color': + return typeof value === 'string' && test(value, patterns[type]) && extension; + case 'file': + return typeof value === 'string' && (await isFile(value)) && extension; + case 'env': + return supported.includes(value); + case 'optionType': + return optionTypes.includes(value); + } + return false; +}; diff --git a/extension/api/web.mjs b/extension/api/web.mjs index 645fc92..03a162d 100644 --- a/extension/api/web.mjs +++ b/extension/api/web.mjs @@ -8,7 +8,7 @@ /** * helpers for manipulation of a webpage - * @module notion-enhancer/api/env + * @module notion-enhancer/api/web */ import { localPath } from './fs.mjs'; diff --git a/extension/repo/CHANGELOG.md b/extension/repo/CHANGELOG.md deleted file mode 100644 index 00ddbfd..0000000 --- a/extension/repo/CHANGELOG.md +++ /dev/null @@ -1,366 +0,0 @@ -# changelog - -### v0.11.0-mods (wip) - -- improved: split the core mod into the theming & menu mods. -- improved: new larger menu layout, with individual mod pages. -- improved: merged bracketed-links into tweaks. -- improved: replaced confusing all-tag filters with themes/extensions/enabled/disabled filters. -- removed: integrated scrollbar tweak (notion now includes by default). -- removed: js insert. css insert moved to tweaks mod. -- removed: majority of layout and font size variables - better to leave former to notion and use `ctrl +` for latter. -- ported: tweaks, bypass-preview. - -#### todo - -- documentation e.g. \_file -- complete/bugfix theming variables - -#### app-specific - -- dragarea height tweak -- tray -- always on top - -**changelog below this point is a mix of the app enhancer and all mods.** -**above this, changelogs have been split: see the** -**[browser enhancer changelog](https://github.com/notion-enhancer/extension/blob/dev/CHANGELOG.md)** -**and the [mods changelog](https://github.com/notion-enhancer/mods/blob/dev/CHANGELOG.md).** - -### v0.10.2 (2020-12-05) - -again, an emergency release for bugfixes. -not properly documented and new features have not yet been fully reviewed/edited. - -- new: side panel - adds an extra sidebar on the right for use by other mods, - toggleable with `ctrl+shift+backslash`. -- improved: notion icons uses spritesheets for faster loading of icons. -- improved: icon sets can be hidden/toggled. -- improved: toggles in the enhancer menu follow the same style as notion's toggles. -- improved: separate quote font variable & option in the font chooser mod (`--theme_[dark|light]--font_quote`). -- improved: option to hide the "page details" text for the word counter extension. -- bugfix: notion icons tab is now visible in fullpage databases. -- bugfix: code line numbers handles wrapped code blocks. -- bugfix: file explorer no longer opens when enhancer menu is opened. -- bugfix: enable the remote module in webviews (windows/tabs) for compatibility with the - updated version of electron used by new notion builds (>= 2.0.10). -- bugfix: add support for enhancing an `app` folder if there is no `app.asar` file present. -- extension: "outliner" = table of contents in right sidebar. -- extension: "panel sites" = embed sites on the site panel. -- extension: "indentation lines" = adds vertical relationship lines to make list trees easier to follow. -- extension: "truncated table titles" = see the full text of the truncated table titles on hover over. - -> 📥 `npm i -g notion-enhancer@0.10.2` - -### v0.10.1 (2020-11-18) - -essentially a prerelease for v0.11.0: pushed out for urgent bugfixes during -exam/study weeks when there's no time to code a full release. - -note that this means new features have not yet been fully documented and -may not be fully ready for ideal use yet. however, things overall will -work more reliably than v0.10.0. - -- new: different css entrypoints for different components (tabs, menu, app). -- improved: use an svg for the scroll-to-top button. -- improved: use a better-matching icon and add transitions to the property layout toggle. -- improved: themes are directly applied to tabs and menu rather than sync-ed between (infinite loading). -- improved: error message "is notion running?" --> clearer "make sure notion isn't running!" -- improved: auto-shrink system for tabs (max of 15 open in a window). -- bugfix: disable fadein of selected block halo with snappy transitions. -- bugfix: increase contrast of `--theme_dark--interactive_hover` in dark+ and dracula. -- bugfix: tabs are focused properly for input. -- bugfix: keyboard shortcut listeners are stricter so they don't conflict. -- bugfix: dots indicating draggability are no longer next to the tabs mod in the menu. -- bugfix: prevent empty hotkeys from triggering every keypress. -- bugfix: don't try loading an empty default page url (infinite loading). -- bugfix: remove `* { z-index: 1}` rule so format dropdowns in table view can be opened. -- extension: "topbar icons" = replaces the topbar buttons with icons. -- extension: "code line numbers" = adds line numbers to code blocks. -- extension: "notion icons" = use custom icon sets directly in notion. -- tweak: vertical indentation/relationship lines for lists. -- tweak: scroll database toolbars horizontally if partially hidden. -- tweak: condense bullet points (decrease line spacing). - -> 📥 `npm i -g notion-enhancer@0.10.1` - -### v0.10.0 (2020-11-02) - -a flexibility update. - -- new: mods can be reordered in the menu to control what order styling/scripts are added/executed in. - higher up on the list = higher priority of application = loaded last in order to override others. - (excluding the core, which though pinned to the top of the list is always loaded first so theming - variables can be modified.) -- new: relaunch button in tray menu. -- new: a core mod option for a default page id/url (all new windows will load it instead of the - normal "most recent" page). -- new: css variables for increasing line spacing/paragraph margins. -- new: patch the notion:// url scheme/protocol to work on linux. -- new: menu shows theme conflicts + a core mod option to auto-resolve theme conflicts. -- new: a `-n` cli option. -- improved: menu will now respect integrated titlebar setting. -- improved: use keyup listeners instead of a globalShortcut for the enhancements menu toggle. -- improved: overwrite `app.asar.bak` if already exists (e.g. for app updates). -- improved: additional menu option descriptions on hover. -- improved: listen to prefers-color-scheme to better change theme in night shift. -- improved: platform-specific option overrides for features not required on macOS. -- improved: made extra padding at the bottom with the "focus mode" extension toggleable. -- bugfix: removed messenger emoji set as the provider no longer supports it. -- bugfix: remove shadow around light mode board headers. -- bugfix: properly detect/respond to `EACCES`/`EBUSY` errors. -- bugfix: night shift checks every interaction, - will respond to system changes without any manual changes. -- bugfix: toc blocks can have text colours. -- bugfix: bypass preview extension works with the back/forward keyboard shortcuts. -- bugfix: (maybe) fix csp issues under proxy. -- bugfix: remove focus mode footer from neutral theme + better contrast in calendar views. -- bugfix: improvements to the colour theming, particularly to make real- and fake-light/dark - modes (as applied by the night shift extension) look consistent. - relevant variables (assuming all are prefixed by `--theme_[dark|light]--`): - `box-shadow`, `box-shadow_strong`, `select_input`, and `ui-border` -- bugfix: font sizing applied to overlays/previews. -- bugfix: removed typo in variable name for brown text. -- bugfix: primary-colour text (mainly in "add a \_" popups) is now properly themed. -- bugfix: right-to-left extension applies to text in columns. -- bugfix: block text colour applies to text with backgrounds. -- bugfix: font applied to wrong mode with littlepig dark. -- bugfix: keep "empty" top bar visible in the menu. -- bugfix: set NSRequiresAquaSystemAppearance to false in /Applications/Notion.app/Contents/Info.plist - so system dark/light mode can be properly detected. -- bugfix: make ctrl+f popover shadow less extreme. -- bugfix: "weekly" calendar view name made case insensitive. -- bugfix: re-show hidden windows when clicking on the dock. -- tweak: sticky table/list rows. -- theme: "material ocean" = an oceanic colour palette. -- theme: "cherry cola" = a delightfully plummy, cherry cola flavored theme. -- theme: "dracula" = a theme based on the popular dracula color palette - originally by zeno rocha and friends. -- extension: "tabs" = have multiple notion pages open in a single window. tabs can be controlled - with keyboard shortcuts and dragged/reordered within/between windows. -- extension: "scroll to top" = add an arrow above the help button to scroll back to the top of a page. -- extension: "tweaks" = common style/layout changes. includes: - - new: make transitions snappy/0s. - - new: in-page columns are disabled/wrapped and pages are wider when - the window is narrower than 600px for improved responsiveness. - - new: thicker bold text for better visibility. - - new: more readable line spacing. - - moved: smooth scrollbars. - - moved: change dragarea height. - - moved: hide help. - -a fork of notion-deb-builder that does generate an app.asar has been created and is once again supported. - -> 📥 `npm i -g notion-enhancer@0.10.0` - -### v0.9.1 (2020-09-26) - -- bugfix: font chooser will continue iterating through fonts after encountering a blank option. -- bugfix: block indents are no longer overriden. -- bugfix: neutral does not force full width pages. -- bugfix: bypass preview extension works with the back/forward arrows. -- bugfix: check all views on a page for a weekly calendar. -- bugfix: emoji sets no longer modifies the user agent = doesn't break hotkeys. - -> 📥 `npm i -g notion-enhancer@0.9.1` - -### v0.9.0 (2020-09-20) - -a feature and cleanup update. - -- improved: halved the number of css rules used -> much better performance. -- improved: font imports must be define in the `mod.js` so that they can also be used in - the enhancements menu. -- improved: tiling window-manager support (can hide titlebars entirely without dragarea/buttons). -- improved: extensions menu search is now case insensitive and includes options, inputs and versions. - the search box can also for focused with `CMD/CTRL+F`. -- improved: extensions menu filters shown either a ✓ or × to help understand the current state. -- improved: added individual text-colour rules for different background colours. -- improved: added variables for callout colouring. -- improved: replaced with `helpers.getNotion()` with the constant `helpers.__notion` to reduce - repeated function calls. -- improved: added variables for page width. -- improved/bugfix: emoji sets extension should now work on macOS and will change user agent to use - real emojis instead of downloading images when system default is selected. -- bugfix: enhancer settings should no longer reset on update (though this will not have - effect until the release after this one). -- bugfix: blue select tags are no longer purple. -- bugfix: page titles now respond to small-text mode. -- bugfix: weekly calendar view height is now sized correctly according to its contents. -- bugfix: made the open enhancements menu hotkey configurable and changed the default to `ALT+E`. - to remove conflict with the inline code highlight shortcut. -- bugfix: update property-layout to match notion changes again. -- bugfix: updated some of the tweak styling to match notion changes. -- bugfix: block-level text colours are now changed properly. -- bugfix: do not require data folder during installation, to prevent `sudo` attempting to - create it in `/var/root/`. -- bugfix: bullet points/checkboxes will now align properly in the right-to-left extension. -- themes: "littlepig" (light + dark) = monospaced themes using emojis and colourful text. -- extension: "font chooser" = customize fonts. for each option, type in the name of the font you would like to use, - or leave it blank to not change anything. -- extension: "always on top" = add an arrow/button to show the notion window on top of other windows - even if it's not focused. -- extension: "calendar scroll" = add a button to scroll down to the current week in fullpage/infinite-scroll calendars. -- extension: "hide help button" = hide the help button if you don't need it. -- extension: "bypass preview" = go straight to the normal full view when opening a page. -- extension: "word counter" = add page details: word/character/sentence/block count & speaking/reading times. - -notion-deb-builder has been discovered to not generate an app.asar and so is no longer supported. - -> 📥 `npm i -g notion-enhancer@0.9.0` - -### v0.8.5 (2020-08-29) - -- bugfix: separate text highlight and select tag variables. -- bugfix: bypass CSP for the `enhancement://` protocol - was failing on some platforms? - -> 📥 `npm i -g notion-enhancer@0.8.5` - -### v0.8.4 (2020-08-29) - -- bugfix: property-layout now works consistently with or without a banner. - -> 📥 `npm i -g notion-enhancer@0.8.4` - -### v0.8.3 (2020-08-29) - -previous release was a mistake: it did as intended on linux, but broke windows. -this should achieve the same thing in a more compatible way. - -> 📥 `npm i -g notion-enhancer@0.8.3` - -### v0.8.2 (2020-08-28) - -some things you just can't test until production... fixed the auto-installer -to use `./bin.js` instead of `notion-enhancer` - -> 📥 `npm i -g notion-enhancer@0.8.2` - -### v0.8.1 (2020-08-28) - -a clarity and stability update. - -- improved: more informative cli error messages (original ones can be accessed with the `-d/--dev` flag). -- bugfix: gallery variable didn't apply on fullpage. -- bugfix: date picker hid current date number. -- bugfix: small-text pages should now work as expected. -- bugfix: padding issues in page previews. -- bugfix: property-layout extension had been broken by internal notion changes. -- bugfix: linux installer path typo. -- bugfix: caret-color was being mistaken for color and block-level text colouring was broken. -- improved: auto-application on install. - -> 📥 `npm i -g notion-enhancer@0.8.1` - -### v0.8.0 (2020-08-27) - -complete rewrite with node.js. - -- new: simpler cli installation system (inc. commands: `apply`, `remove`, and `check`). -- new: mod loading system (easier to create new mods, adds to notion rather than overwriting). -- new: mod configuration menu. -- improved: more theming variable coverage - inc. light theme and sizing/spacing. -- bugfix: non-reproducable errors with python. -- bugfix: better launcher patching on linux. -- bugfix: fix frameless window issue introduced by notion desktop 2.0.9. -- extension: "custom inserts" = link files for small client-side tweaks. -- extension: "bracketed links" = render links surrounded with \[\[brackets]] instead of underlined. -- extension: "focus mode" = hide the titlebar/menubar if the sidebar is closed (will be shown on hover). -- theme: "dark+" = a vivid-colour near-black theme. -- theme: "neutral" = smoother colours and fonts, designed to be more pleasing to the eye. -- theme: "gameish" = a purple, "gamer-styled" theme with a blocky-font. -- theme: "pastel dark" = a smooth-transition true dark theme with a hint of pastel. -- extension: "emoji sets" = pick from a variety of emoji styles to use. -- extension: "night shift" = sync dark/light theme with the system (overrides normal theme setting). -- extension: "right-to-left" = enables auto rtl/ltr text direction detection. (ported from [github.com/obahareth/notion-rtl](https://github.com/obahareth/notion-rtl).) -- extension: "weekly view" = calendar views named "weekly" will show only the 7 days of this week. (ported from [github.com/adihd/notionweeklyview](https://github.com/adihd/notionweeklyview).)] -- extension: "property layout" = auto-collapse page properties that usually push down page content. (ported from [github.com/alexander-kazakov/notion-layout-extension](https://github.com/alexander-kazakov/notion-layout-extension).) - -> 📥 `npm i -g notion-enhancer@0.8.0` - -### v0.7.0 (2020-07-09) - -- new: tray option to use system default emojis (instead of twitter's emojiset). -- new: mac support (identical functionality to other platforms with the - exception of the native minimise/maximise/close buttons being kept, as they integrate - better with the OS while not being out-of-place in notion). -- new: notion-deb-builder support for linux. -- new: an alert will be shown if there is an update available for the enhancer. -- improved: replaced button symbols with svgs for multi-platform support. -- improved: window close button is now red on hover (thanks to [@torchatlas](https://github.com/torchatlas)). -- bugfix: `cleaner.py` patched for linux. -- bugfix: tray now operates as expected on linux. -- bugfix: odd mix of `\\` and `/` being used for windows filepaths. -- bugfix: app no longer crashes when sidebar is toggled. - -> 📥 [notion-enhancer.v0.7.0.zip](https://github.com/notion-enhancer/notion-enhancer/archive/v0.7.0.zip) - -### v0.6.0 (2020-06-30) - -- style: custom fonts. -- style: font resizing. -- style: hide discussions (thanks to [u/Roosmaryn](https://www.reddit.com/user/Roosmaryn/)). -- new: custom colour theming, demonstrated via the dark+ theme. -- new: linux support (thanks to [@Blacksuan19](https://github.com/Blacksuan19)). -- improved: if hotkey is pressed while notion is unfocused, it will bring it to the front rather than hiding it. -- improved: stop window buttons breaking at smaller widths. -- improved: more obviously visible drag area. -- bugfix: specify UTF-8 encoding to prevent multibyte/gbk codec errors (thanks to [@etnperlong](https://github.com/etnperlong)). - -> 📥 [notion-enhancer.v0.6.0.zip](https://github.com/notion-enhancer/notion-enhancer/archive/v0.6.0.zip) - -### v0.5.0 (2020-05-23) - -- new: running from the wsl. -- new: reload window with f5. -- improved: code has been refactored and cleaned up, - inc. file renaming and a `customiser.py` that doesn't require - a run of `cleaner.py` to build modifications. - improved: scrollbar colours that fit better with notion's theming. -- bugfix: un-break having multiple notion windows open. - -> 📥 [notion-enhancer.v0.5.0.zip](https://github.com/notion-enhancer/notion-enhancer/archive/v0.5.0.zip) - -**development here taken over by [@dragonwocky](https://github.com/dragonwocky).** - -**the ~~crossed out~~ features below are no longer features included by default,** -**but can still easily be added as [custom tweaks](https://github.com/notion-enhancer/tweaks).** - -### v0.4.1 (2020-02-13) - -- bugfix: wider table & the "+" button not working in database pages. - -> 📥 [notion-enhancer.v4.1.zip](https://s3-us-west-2.amazonaws.com/secure.notion-static.com/d239a3cf-d553-4ef3-ab04-8b47892d9f9a/Notion_Customization_v4.1.zip) - -### v0.4.0 - -- new: tray icon. -- new: app startup options (+ saving). -- new: `Reset.py` -- improved: better output from `Customization Patcher.py`. -- bugfix: wider tables in "short page" mode. -- bugfix: unclickable buttons/draggable area (of titlebar). - -### v0.3.0 - -- new: show/hide window hotkey. -- new: app startup options. -- ~~style: smaller table icons.~~ - -> 📥 [notion-enhancer.v3.zip](https://s3-us-west-2.amazonaws.com/secure.notion-static.com/b01aa446-5727-476a-a25e-395472bfb1be/NotionScriptsV3.zip) - -### v0.2.0 - -- new: light/dark theme support for window control buttons + scrollbars. -- new: custom styles directly linked to the enhancer resources + compatible with web version. -- ~~improved: making table column width go below 100px.~~ - -### v0.1.0 - -- new: custom window control buttons. -- removed: default titlebar/menubar. -- ~~removed: huge padding of board view.~~ -- ~~removed: huge padding of table view.~~ -- ~~optional: making table column width go below 100px.~~ -- ~~style: thinner cover image + higher content block.~~ -- style: scrollbars. diff --git a/extension/repo/bypass-preview@cb6fd684-f113-4a7a-9423-8f0f0cff069f/client.js b/extension/repo/bypass-preview@cb6fd684-f113-4a7a-9423-8f0f0cff069f/client.mjs similarity index 100% rename from extension/repo/bypass-preview@cb6fd684-f113-4a7a-9423-8f0f0cff069f/client.js rename to extension/repo/bypass-preview@cb6fd684-f113-4a7a-9423-8f0f0cff069f/client.mjs diff --git a/extension/repo/bypass-preview@cb6fd684-f113-4a7a-9423-8f0f0cff069f/mod.json b/extension/repo/bypass-preview@cb6fd684-f113-4a7a-9423-8f0f0cff069f/mod.json index f77d96b..f350807 100644 --- a/extension/repo/bypass-preview@cb6fd684-f113-4a7a-9423-8f0f0cff069f/mod.json +++ b/extension/repo/bypass-preview@cb6fd684-f113-4a7a-9423-8f0f0cff069f/mod.json @@ -1,21 +1,23 @@ { "name": "bypass-preview", "id": "cb6fd684-f113-4a7a-9423-8f0f0cff069f", - "description": "go straight to the normal full view when opening a page.", "version": "0.2.0", + "environments": ["linux", "win32", "darwin", "extension"], + "description": "go straight to the normal full view when opening a page.", "tags": ["extension", "automation"], "authors": [ { "name": "dragonwocky", "email": "thedragonring.bod@gmail.com", - "url": "https://dragonwocky.me/", - "icon": "https://dragonwocky.me/avatar.jpg" + "homepage": "https://dragonwocky.me/", + "avatar": "https://dragonwocky.me/avatar.jpg" } ], "js": { - "client": ["client.js"] + "client": ["client.mjs"] }, "css": { "client": ["client.css"] - } + }, + "options": [] } diff --git a/extension/repo/calendar-scroll@b1c7db33-dfee-489a-a76c-0dd66f7ed29a/client.js b/extension/repo/calendar-scroll@b1c7db33-dfee-489a-a76c-0dd66f7ed29a/client.mjs similarity index 100% rename from extension/repo/calendar-scroll@b1c7db33-dfee-489a-a76c-0dd66f7ed29a/client.js rename to extension/repo/calendar-scroll@b1c7db33-dfee-489a-a76c-0dd66f7ed29a/client.mjs diff --git a/extension/repo/calendar-scroll@b1c7db33-dfee-489a-a76c-0dd66f7ed29a/mod.json b/extension/repo/calendar-scroll@b1c7db33-dfee-489a-a76c-0dd66f7ed29a/mod.json index 427ec93..1c0f72a 100644 --- a/extension/repo/calendar-scroll@b1c7db33-dfee-489a-a76c-0dd66f7ed29a/mod.json +++ b/extension/repo/calendar-scroll@b1c7db33-dfee-489a-a76c-0dd66f7ed29a/mod.json @@ -1,21 +1,23 @@ { "name": "calendar-scroll", "id": "b1c7db33-dfee-489a-a76c-0dd66f7ed29a", - "description": "add a button to scroll down to the current week in fullpage/infinite-scroll calendars.", "version": "0.2.0", + "environments": ["linux", "win32", "darwin", "extension"], + "description": "add a button to scroll down to the current week in fullpage/infinite-scroll calendars.", "tags": ["extension", "shortcut"], "authors": [ { "name": "dragonwocky", "email": "thedragonring.bod@gmail.com", - "url": "https://dragonwocky.me/", - "icon": "https://dragonwocky.me/avatar.jpg" + "homepage": "https://dragonwocky.me/", + "avatar": "https://dragonwocky.me/avatar.jpg" } ], "js": { - "client": ["client.js"] + "client": ["client.mjs"] }, "css": { "client": ["client.css"] - } + }, + "options": [] } diff --git a/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/client.js b/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/client.mjs similarity index 100% rename from extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/client.js rename to extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/client.mjs diff --git a/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/menu.js b/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/menu.js index 50e3b88..b98593f 100644 --- a/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/menu.js +++ b/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/menu.js @@ -7,7 +7,7 @@ 'use strict'; const _id = 'a6621988-551d-495a-97d8-3c568bca2e9e'; -import { env, storage, web, fmt, fs, registry, regexers } from '../../api/_.mjs'; +import { env, storage, web, fmt, fs, registry } from '../../api/_.mjs'; for (const mod of await registry.get((mod) => registry.isEnabled(mod.id))) { for (const sheet of mod.css?.menu || []) { diff --git a/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/mod.json b/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/mod.json index 6439d83..6a03319 100644 --- a/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/mod.json +++ b/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/mod.json @@ -2,14 +2,15 @@ "name": "menu", "id": "a6621988-551d-495a-97d8-3c568bca2e9e", "version": "0.11.0", + "environments": ["linux", "win32", "darwin", "extension"], "description": "the enhancer's graphical menu, related buttons and shortcuts.", "tags": ["core"], "authors": [ { "name": "dragonwocky", "email": "thedragonring.bod@gmail.com", - "url": "https://dragonwocky.me/", - "icon": "https://dragonwocky.me/avatar.jpg" + "homepage": "https://dragonwocky.me/", + "avatar": "https://dragonwocky.me/avatar.jpg" } ], "css": { @@ -18,7 +19,7 @@ "menu": ["menu.css", "markdown.css", "tooltips.css"] }, "js": { - "client": ["client.js"] + "client": ["client.mjs"] }, "options": [ { diff --git a/extension/repo/theming@0f0bf8b6-eae6-4273-b307-8fc43f2ee082/client.js b/extension/repo/theming@0f0bf8b6-eae6-4273-b307-8fc43f2ee082/client.mjs similarity index 100% rename from extension/repo/theming@0f0bf8b6-eae6-4273-b307-8fc43f2ee082/client.js rename to extension/repo/theming@0f0bf8b6-eae6-4273-b307-8fc43f2ee082/client.mjs diff --git a/extension/repo/theming@0f0bf8b6-eae6-4273-b307-8fc43f2ee082/mod.json b/extension/repo/theming@0f0bf8b6-eae6-4273-b307-8fc43f2ee082/mod.json index f4c9978..cc32d56 100644 --- a/extension/repo/theming@0f0bf8b6-eae6-4273-b307-8fc43f2ee082/mod.json +++ b/extension/repo/theming@0f0bf8b6-eae6-4273-b307-8fc43f2ee082/mod.json @@ -1,15 +1,16 @@ { "name": "theming", "id": "0f0bf8b6-eae6-4273-b307-8fc43f2ee082", - "description": "the default theme variables, required by other themes & extensions.", "version": "0.11.0", + "environments": ["linux", "win32", "darwin", "extension"], + "description": "the default theme variables, required by other themes & extensions.", "tags": ["core"], "authors": [ { "name": "dragonwocky", "email": "thedragonring.bod@gmail.com", - "url": "https://dragonwocky.me/", - "icon": "https://dragonwocky.me/avatar.jpg" + "homepage": "https://dragonwocky.me/", + "avatar": "https://dragonwocky.me/avatar.jpg" } ], "css": { @@ -18,6 +19,7 @@ "menu": ["variables.css", "prism.css"] }, "js": { - "client": ["client.js"] - } + "client": ["client.mjs"] + }, + "options": [] } diff --git a/extension/repo/tweaks@5174a483-c88d-4bf8-a95f-35cd330b76e2/client.js b/extension/repo/tweaks@5174a483-c88d-4bf8-a95f-35cd330b76e2/client.mjs similarity index 100% rename from extension/repo/tweaks@5174a483-c88d-4bf8-a95f-35cd330b76e2/client.js rename to extension/repo/tweaks@5174a483-c88d-4bf8-a95f-35cd330b76e2/client.mjs diff --git a/extension/repo/tweaks@5174a483-c88d-4bf8-a95f-35cd330b76e2/mod.json b/extension/repo/tweaks@5174a483-c88d-4bf8-a95f-35cd330b76e2/mod.json index 1fd5716..da5b0da 100644 --- a/extension/repo/tweaks@5174a483-c88d-4bf8-a95f-35cd330b76e2/mod.json +++ b/extension/repo/tweaks@5174a483-c88d-4bf8-a95f-35cd330b76e2/mod.json @@ -2,21 +2,22 @@ "name": "tweaks", "id": "5174a483-c88d-4bf8-a95f-35cd330b76e2", "version": "0.2.0", + "environments": ["linux", "win32", "darwin", "extension"], "description": "common style/layout changes and custom inserts.", "tags": ["extension", "customisation"], "authors": [ { "name": "dragonwocky", "email": "thedragonring.bod@gmail.com", - "url": "https://dragonwocky.me/", - "icon": "https://dragonwocky.me/avatar.jpg" + "homepage": "https://dragonwocky.me/", + "avatar": "https://dragonwocky.me/avatar.jpg" } ], "css": { "client": ["client.css"] }, "js": { - "client": ["client.js"] + "client": ["client.mjs"] }, "options": [ {