From ebfc134e3da3a12dc7b881346bd2f1c6e45bf63f Mon Sep 17 00:00:00 2001 From: Serraniel Date: Sat, 25 Apr 2020 22:20:26 +0200 Subject: [PATCH] Added basic chrome extension source codes Manifest file and some aniwatch utils --- manifest.json | 20 ++++++++++++++++++++ utils/aniwatchCore.js | 10 ++++++++++ utils/colors.js | 1 + 3 files changed, 31 insertions(+) create mode 100644 manifest.json create mode 100644 utils/aniwatchCore.js create mode 100644 utils/colors.js diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..33f02aa --- /dev/null +++ b/manifest.json @@ -0,0 +1,20 @@ + { + "name": "Enhanced Aniwatch", + "version": "0.1.0.0", + "description": "Contains several enhancments for https://aniwatch.me", + "manifest_version": 2, + "author": "Serraniel", + "homepage_url": "https://github.com/Serraniel/EnhancedAniwatch", + "content_scripts": [ + { + "matches": [ + "*://aniwatch.me/*" + ], + "js": [ + "utils/colors.js", + "utils/aniwatchCore.js" + ], + "run_at": "document_start" + } + ] + } \ No newline at end of file diff --git a/utils/aniwatchCore.js b/utils/aniwatchCore.js new file mode 100644 index 0000000..263247a --- /dev/null +++ b/utils/aniwatchCore.js @@ -0,0 +1,10 @@ +function executeAfterPreload(func){ + let preLoader = document.getElementById('preloader'); + + let loop = setInterval(() => { + if(preLoader.style.display==="none"){ + clearInterval(loop); + func(); + } + }, 100); +} \ No newline at end of file diff --git a/utils/colors.js b/utils/colors.js new file mode 100644 index 0000000..a3c864b --- /dev/null +++ b/utils/colors.js @@ -0,0 +1 @@ +const aniBlue = "#348fff"; \ No newline at end of file