diff --git a/src/content_scripts/modals.css b/src/content_scripts/modals.css index a0dc7ff43..073133e94 100644 --- a/src/content_scripts/modals.css +++ b/src/content_scripts/modals.css @@ -142,3 +142,27 @@ #xkit-modal .buttons :is(a, button, input).blue { background-color: rgb(var(--blue)); } + +.xkit-modal-tag, +.xkit-modal-blog { + display: inline-block; + + font-size: 1rem; + line-height: 1.5; +} + +.xkit-modal-tag { + padding: 0 0.5em; + border-radius: 1em; + margin: 0.25rem 0; + + background-color: rgb(var(--deprecated-accent)); + color: rgb(var(--navy)); +} + +.xkit-modal-blog { + font-weight: 700; +} + +.xkit-modal-tag::before { content: '#'; } +.xkit-modal-blog::before { content: '@'; } diff --git a/src/features/mass_privater.css b/src/features/mass_privater.css deleted file mode 100644 index ad9c5aa4e..000000000 --- a/src/features/mass_privater.css +++ /dev/null @@ -1,23 +0,0 @@ -.mass-privater-tag, -.mass-privater-blog { - display: inline-block; - - font-size: 1rem; - line-height: 1.5; -} - -.mass-privater-tag { - padding: 0 0.5em; - border-radius: 1em; - margin: 0.25rem 0; - - background-color: rgb(var(--deprecated-accent)); - color: rgb(var(--navy)); -} - -.mass-privater-blog { - font-weight: 700; -} - -.mass-privater-tag::before { content: '#'; } -.mass-privater-blog::before { content: '@'; } diff --git a/src/features/mass_privater.js b/src/features/mass_privater.js index 69ca20b6c..9b258b357 100644 --- a/src/features/mass_privater.js +++ b/src/features/mass_privater.js @@ -1,6 +1,6 @@ import { dom } from '../utils/dom.js'; import { megaEdit } from '../utils/mega_editor.js'; -import { showModal, modalCancelButton, modalCompleteButton, hideModal, showErrorModal } from '../utils/modals.js'; +import { showModal, modalCancelButton, modalCompleteButton, hideModal, showErrorModal, createTagSpan, createBlogSpan } from '../utils/modals.js'; import { addSidebarItem, removeSidebarItem } from '../utils/sidebar.js'; import { apiFetch } from '../utils/tumblr_helpers.js'; import { userBlogs } from '../utils/user.js'; @@ -8,8 +8,6 @@ import { userBlogs } from '../utils/user.js'; const getPostsFormId = 'xkit-mass-privater-get-posts'; const createBlogOption = ({ name, title, uuid }) => dom('option', { value: uuid, title }, null, [name]); -const createTagSpan = tag => dom('span', { class: 'mass-privater-tag' }, null, [tag]); -const createBlogSpan = name => dom('span', { class: 'mass-privater-blog' }, null, [name]); const sleep = ms => new Promise(resolve => setTimeout(resolve, ms)); const dateTimeFormat = new Intl.DateTimeFormat(document.documentElement.lang, { @@ -280,4 +278,3 @@ const sidebarOptions = { export const main = async () => addSidebarItem(sidebarOptions); export const clean = async () => removeSidebarItem(sidebarOptions.id); -export const stylesheet = true; diff --git a/src/features/tag_replacer.css b/src/features/tag_replacer.css deleted file mode 100644 index 1a5538c80..000000000 --- a/src/features/tag_replacer.css +++ /dev/null @@ -1,23 +0,0 @@ -.tag-replacer-tag, -.tag-replacer-blog { - display: inline-block; - - font-size: 1rem; - line-height: 1.5; -} - -.tag-replacer-tag { - padding: 0 0.5em; - border-radius: 1em; - margin: 0.25rem 0; - - background-color: rgb(var(--deprecated-accent)); - color: rgb(var(--navy)); -} - -.tag-replacer-blog { - font-weight: 700; -} - -.tag-replacer-tag::before { content: '#'; } -.tag-replacer-blog::before { content: '@'; } diff --git a/src/features/tag_replacer.js b/src/features/tag_replacer.js index fbd457866..aeb56b852 100644 --- a/src/features/tag_replacer.js +++ b/src/features/tag_replacer.js @@ -1,6 +1,6 @@ import { dom } from '../utils/dom.js'; import { megaEdit } from '../utils/mega_editor.js'; -import { showModal, modalCancelButton, modalCompleteButton, showErrorModal } from '../utils/modals.js'; +import { showModal, modalCancelButton, modalCompleteButton, showErrorModal, createTagSpan, createBlogSpan } from '../utils/modals.js'; import { addSidebarItem, removeSidebarItem } from '../utils/sidebar.js'; import { apiFetch } from '../utils/tumblr_helpers.js'; import { userBlogs } from '../utils/user.js'; @@ -8,8 +8,6 @@ import { userBlogs } from '../utils/user.js'; const getPostsFormId = 'xkit-tag-replacer-get-posts'; const createBlogOption = ({ name, title, uuid }) => dom('option', { value: uuid, title }, null, [name]); -const createTagSpan = tag => dom('span', { class: 'tag-replacer-tag' }, null, [tag]); -const createBlogSpan = name => dom('span', { class: 'tag-replacer-blog' }, null, [name]); const sleep = ms => new Promise(resolve => setTimeout(resolve, ms)); const showInitialPrompt = async () => { @@ -207,4 +205,3 @@ const sidebarOptions = { export const main = async () => addSidebarItem(sidebarOptions); export const clean = async () => removeSidebarItem(sidebarOptions.id); -export const stylesheet = true; diff --git a/src/utils/modals.js b/src/utils/modals.js index 3449ee9db..4d30e3f1b 100644 --- a/src/utils/modals.js +++ b/src/utils/modals.js @@ -59,3 +59,6 @@ export const showErrorModal = exception => { buttons: [modalCompleteButton] }); }; + +export const createTagSpan = tag => dom('span', { class: 'xkit-modal-tag' }, null, [tag]); +export const createBlogSpan = name => dom('span', { class: 'xkit-modal-blog' }, null, [name]);