diff --git a/src/javascript/enhancements/animeRequests.js b/src/javascript/enhancements/animeRequests.js index 05e21fe..171f191 100644 --- a/src/javascript/enhancements/animeRequests.js +++ b/src/javascript/enhancements/animeRequests.js @@ -31,7 +31,7 @@ function changeBorderColorOwnRequests(node) { // highlight left border for own request if (profileLink.length > 0) { - item.style.borderColor = color.aniBlue + item.style.borderLeftColor = color.aniBlue } } diff --git a/src/javascript/enhancements/lists.js b/src/javascript/enhancements/lists.js deleted file mode 100644 index eb6ffa6..0000000 --- a/src/javascript/enhancements/lists.js +++ /dev/null @@ -1,33 +0,0 @@ -import * as core from '../utils/aniwatchCore'; -import * as helper from '../utils/helpers'; - -export function init() { - core.registerScript(node => { - // run the scripts - if (helper.isHtmlElement(node)) { - addListHorizontalSeparators(node) - } - }, ".*"); -} - -function addListHorizontalSeparators(node) { - const targetTagName = 'MD-LIST-ITEM'; // tagName is upper case - - let updateFunc = item => { - // add border as horizontal seperator - item.style.borderBottom = "1px solid rgba(155,155,155, 0.2)"; - } - - // are we target tag? - if (node.tagName === targetTagName) { - updateFunc(node); - } else { - // find items -> all - let requestItems = node.querySelectorAll('md-list-item'); - - // update borders - requestItems.forEach(item => { - updateFunc(item); - }); - } -} \ No newline at end of file diff --git a/src/javascript/index.js b/src/javascript/index.js index fe14197..9d86b8a 100644 --- a/src/javascript/index.js +++ b/src/javascript/index.js @@ -5,7 +5,6 @@ import { initHelpers } from './utils/helpers'; // enhancements import { init as animeRequests } from './enhancements/animeRequests'; import { init as languageDisplay } from './enhancements/languageDisplay'; -import { init as lists } from './enhancements/lists'; import { init as quickSearch } from './enhancements/quickSearch'; // core @@ -17,5 +16,4 @@ initHelpers(); // enhancements animeRequests(); languageDisplay(); -lists(); quickSearch(); \ No newline at end of file diff --git a/src/manifests/chrome.manifest.json b/src/manifests/chrome.manifest.json index f4274d4..0f4c6ac 100644 --- a/src/manifests/chrome.manifest.json +++ b/src/manifests/chrome.manifest.json @@ -21,6 +21,9 @@ "js": [ "javascript/app.min.js" ], + "css": [ + "stylesheets/aniwatchplus.min.css" + ], "run_at": "document_end" }] } \ No newline at end of file diff --git a/src/manifests/firefox.manifest.json b/src/manifests/firefox.manifest.json index e301f42..3cc2904 100644 --- a/src/manifests/firefox.manifest.json +++ b/src/manifests/firefox.manifest.json @@ -21,6 +21,9 @@ "js": [ "javascript/app.min.js" ], + "css": [ + "stylesheets/aniwatchplus.min.css" + ], "run_at": "document_end" }] } \ No newline at end of file diff --git a/src/manifests/manifest.template.json b/src/manifests/manifest.template.json index 81eb84f..8d39499 100644 --- a/src/manifests/manifest.template.json +++ b/src/manifests/manifest.template.json @@ -25,6 +25,9 @@ "js": [ "javascript/app.min.js" ], + "css": [ + "stylesheets/aniwatchplus.min.css" + ], "run_at": "document_end" }] } \ No newline at end of file diff --git a/src/manifests/opera.manifest.json b/src/manifests/opera.manifest.json index 333b31e..0ad7f9e 100644 --- a/src/manifests/opera.manifest.json +++ b/src/manifests/opera.manifest.json @@ -22,6 +22,9 @@ "js": [ "javascript/app.min.js" ], + "css": [ + "stylesheets/aniwatchplus.min.css" + ], "run_at": "document_end" }] } \ No newline at end of file diff --git a/src/stylesheets/aniwatchplus.scss b/src/stylesheets/aniwatchplus.scss new file mode 100644 index 0000000..cdcb559 --- /dev/null +++ b/src/stylesheets/aniwatchplus.scss @@ -0,0 +1,5 @@ +// vars +@import './vars/colors'; + +// enhancements +@import './enhancements/lists.scss'; \ No newline at end of file diff --git a/src/stylesheets/enhancements/_lists.scss b/src/stylesheets/enhancements/_lists.scss new file mode 100644 index 0000000..078205e --- /dev/null +++ b/src/stylesheets/enhancements/_lists.scss @@ -0,0 +1,5 @@ +md-list-item { + &:not(:last-child) { + border-bottom: 1px solid $gray; + } +} diff --git a/src/stylesheets/vars/_colors.scss b/src/stylesheets/vars/_colors.scss new file mode 100644 index 0000000..4e6f2b7 --- /dev/null +++ b/src/stylesheets/vars/_colors.scss @@ -0,0 +1,2 @@ +$aniwatchBlue: #348fff; +$gray: rgba(155, 155, 155, 0.2);