renaming some files

This commit is contained in:
ManeraKai 2022-02-02 21:22:34 +03:00
parent 84333daede
commit 3394aec204
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
9 changed files with 38 additions and 29 deletions

View File

@ -3,11 +3,11 @@ import youtubeHelper from "./youtube.js";
import instagramHelper from "./instagram.js";
import mediumHelper from "./medium.js";
import redditHelper from "./reddit.js";
import searchHelper from "./google-search.js";
import searchHelper from "./search.js";
import data from '../data.js'
import googleTranslateHelper from "./google-translate.js";
import googleTranslateHelper from "./translate.js";
import wikipediaHelper from "./wikipedia.js";
import mapsHelper from "./google-maps.js";
import mapsHelper from "./maps.js";
import medium from "./medium.js";

View File

@ -1,16 +1,16 @@
"use strict";
import mapsHelper from "../../assets/javascripts/helpers/google-maps.js";
import mapsHelper from "../../assets/javascripts/helpers/maps.js";
import twitterHelper from "../../assets/javascripts/helpers/twitter.js";
import youtubeHelper from "../../assets/javascripts/helpers/youtube.js";
import instagramHelper from "../../assets/javascripts/helpers/instagram.js";
import mediumHelper from "../../assets/javascripts/helpers/medium.js";
import redditHelper from "../../assets/javascripts/helpers/reddit.js";
import searchHelper from "../../assets/javascripts/helpers/google-search.js";
import googleTranslateHelper from "../../assets/javascripts/helpers/google-translate.js";
import searchHelper from "../../assets/javascripts/helpers/search.js";
import googleTranslateHelper from "../../assets/javascripts/helpers/translate.js";
import wikipediaHelper from "../../assets/javascripts/helpers/wikipedia.js";
import data from "../../assets/javascripts/data.js";
import googleMaps from "../../assets/javascripts/helpers/google-maps.js";
import googleMaps from "../../assets/javascripts/helpers/maps.js";
window.browser = window.browser || window.chrome;
@ -60,10 +60,8 @@ browser.webRequest.onBeforeRequest.addListener(
else if (googleTranslateHelper.targets.includes(url.host)) newUrl = await googleTranslateHelper.redirect(url, initiator);
else if (searchHelper.targets.some((rx) => rx.test(url.href))) newUrl = await searchHelper.redirect(url, initiator)
else if (url.host.match(wikipediaHelper.targets)) newUrl = await wikipediaHelper.redirect(url, initiator);
if (newUrl) {

View File

@ -1,4 +1,4 @@
import mapsHelper from "../../assets/javascripts/helpers/google-maps.js";
import mapsHelper from "../../assets/javascripts/helpers/maps.js";
let disableOsmElement = document.getElementById("disable-osm");

View File

@ -1,4 +1,4 @@
import searchHelper from "../../assets/javascripts/helpers/google-search.js";
import searchHelper from "../../assets/javascripts/helpers/search.js";
let disableSearchElement = document.getElementById("disable-search");
let searchFrontendElement = document.getElementById("search-frontend");

View File

@ -1,4 +1,4 @@
import googleTranslateHelper from "../../assets/javascripts/helpers/google-translate.js";
import googleTranslateHelper from "../../assets/javascripts/helpers/translate.js";
let disableSimplyTranslateElement = document.getElementById("disable-simplyTranslate");
let translateFrontendElement = document.getElementById("translate-frontend");

View File

@ -2,13 +2,13 @@
import commonHelper from "../../assets/javascripts/helpers/common.js";
import data from "../../assets/javascripts/data.js";
import twitterHelper from "../../assets/javascripts/helpers/twitter.js";
import youtubeHelper from "../../assets/javascripts/helpers/youtube.js";
import twitterHelper from "../../assets/javascripts/helpers/twitter.js";
import instagramHelper from "../../assets/javascripts/helpers/instagram.js";
import mapsHelper from "../../assets/javascripts/helpers/google-maps.js";
import mapsHelper from "../../assets/javascripts/helpers/maps.js";
import redditHelper from "../../assets/javascripts/helpers/reddit.js";
import searchHelper from "../../assets/javascripts/helpers/google-search.js";
import translateHelper from "../../assets/javascripts/helpers/google-translate.js";
import searchHelper from "../../assets/javascripts/helpers/search.js";
import translateHelper from "../../assets/javascripts/helpers/translate.js";
import wikipediaHelper from "../../assets/javascripts/helpers/wikipedia.js";
import mediumHelper from "../../assets/javascripts/helpers/medium.js";
@ -24,19 +24,31 @@ let disableScribeElement = document.querySelector("#disable-scribe");
window.browser = window.browser || window.chrome;
// Complete change to the global variables in data.js
if (data.theme) document.body.classList.add(data.theme);
disableNitterElement.checked = !data.disableNitter;
disableInvidiousElement.checked = !data.disableInvidious;
disableBibliogramElement.checked = !data.disableBibliogram;
disableOsmElement.checked = !data.disableOsm;
disableRedditElement.checked = !data.disableReddit;
disableSearchElement.checked = !data.disableSearch;
disableSimplyTranslateElement.checked = !data.disableSimplyTranslate;
disableWikipediaElement.checked = !data.disableWikipedia;
disableScribeElement.checked = !data.disableScribe;
async function wholeInit() {
console.log("staring async func")
await youtubeHelper.init();
await twitterHelper.init();
await instagramHelper.init();
await mapsHelper.init();
await redditHelper.init();
await searchHelper.init();
await translateHelper.init();
await wikipediaHelper.init();
await mediumHelper.init();
};
wholeInit().then(() => {
if (data.theme) document.body.classList.add(data.theme);
disableNitterElement.checked = !twitterHelper.getDisableNitter();
disableInvidiousElement.checked = !youtubeHelper.getDisableInvidious();
disableBibliogramElement.checked = !instagramHelper.getDisableBibliogram();
disableOsmElement.checked = !mapsHelper.getDisableOsm();
disableRedditElement.checked = !redditHelper.getDisableReddit();
disableSearchElement.checked = !searchHelper.getDisableSearch();
disableSimplyTranslateElement.checked = !translateHelper.getDisableSimplyTranslate();
disableWikipediaElement.checked = !wikipediaHelper.getDisableWikipedia();
disableScribeElement.checked = !mediumHelper.getDisableScribe();
})
disableNitterElement.addEventListener("change",
(event) => twitterHelper.setDisableNitter(!event.target.checked)
@ -74,7 +86,6 @@ disableScribeElement.addEventListener("change",
(event) => mediumHelper.setDisableScribe(!event.target.checked)
);
document.querySelector("#update-instances").addEventListener("click", () => {
document.querySelector("#update-instances").innerHTML = '...';
if (commonHelper.updateInstances())