Feature/#32 option menu #112
|
@ -1,3 +1,4 @@
|
||||||
|
import { getGlobalConfiguration } from '../configuration/configuration';
|
||||||
import * as core from '../utils/aniwatchCore';
|
import * as core from '../utils/aniwatchCore';
|
||||||
import * as helper from '../utils/helpers';
|
import * as helper from '../utils/helpers';
|
||||||
|
|
||||||
|
@ -5,12 +6,14 @@ const SCREENSHOT_TOOLTIP_ID = 'anilyr-screenshots-tooltip';
|
||||||
const PLAYER_ID = 'player';
|
const PLAYER_ID = 'player';
|
||||||
|
|
||||||
export function init() {
|
export function init() {
|
||||||
|
if (getGlobalConfiguration().playerAutoplayAfterScreenshot) {
|
||||||
core.registerScript(node => {
|
core.registerScript(node => {
|
||||||
if (helper.isHtmlElement(node) && node.id === SCREENSHOT_TOOLTIP_ID) {
|
if (helper.isHtmlElement(node) && node.id === SCREENSHOT_TOOLTIP_ID) {
|
||||||
observeScreenshotTooltip(node);
|
observeScreenshotTooltip(node);
|
||||||
}
|
}
|
||||||
}, "^/anime/[0-9]*/[0-9]*$");
|
}, "^/anime/[0-9]*/[0-9]*$");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function observeScreenshotTooltip(tooltip) {
|
function observeScreenshotTooltip(tooltip) {
|
||||||
let observer = new MutationObserver(mutations => {
|
let observer = new MutationObserver(mutations => {
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
|
import { getGlobalConfiguration } from '../configuration/configuration';
|
||||||
import * as core from '../utils/aniwatchCore';
|
import * as core from '../utils/aniwatchCore';
|
||||||
import * as color from '../utils/colors';
|
import * as color from '../utils/colors';
|
||||||
import * as helper from '../utils/helpers';
|
import * as helper from '../utils/helpers';
|
||||||
|
|
||||||
export function init() {
|
export function init() {
|
||||||
|
if (getGlobalConfiguration().requestBeautifyPage) {
|
||||||
core.registerScript(node => {
|
core.registerScript(node => {
|
||||||
// run the scripts
|
// run the scripts
|
||||||
if (helper.isHtmlElement(node)) {
|
if (helper.isHtmlElement(node)) {
|
||||||
|
@ -12,6 +14,7 @@ export function init() {
|
||||||
}
|
}
|
||||||
}, "/requests");
|
}, "/requests");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function changeFollowedStarColor(node) {
|
function changeFollowedStarColor(node) {
|
||||||
const starIcon = 'star';
|
const starIcon = 'star';
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
Done and working, agaub. Done and working, agaub.
That if statement has to be removed. That if statement has to be removed.
Done and working, agaub. Done and working, agaub.
|
|||||||
|
import { getGlobalConfiguration } from '../configuration/configuration';
|
||||||
That if statement has to be removed. That if statement has to be removed.
Done and working, agaub. Done and working, agaub.
|
|||||||
import * as core from '../utils/aniwatchCore';
|
import * as core from '../utils/aniwatchCore';
|
||||||
import * as helper from '../utils/helpers';
|
import * as helper from '../utils/helpers';
|
||||||
|
|
||||||
export function init() {
|
export function init() {
|
||||||
|
if (getGlobalConfiguration().animeLanguageDisplay) {
|
||||||
That if statement has to be removed. That if statement has to be removed.
Done and working, agaub. Done and working, agaub.
|
|||||||
core.registerScript(node => {
|
core.registerScript(node => {
|
||||||
// run the scripts
|
// run the scripts
|
||||||
if (helper.isHtmlElement(node)) {
|
if (helper.isHtmlElement(node)) {
|
||||||
|
@ -9,6 +11,7 @@ export function init() {
|
||||||
That if statement has to be removed. That if statement has to be removed.
Done and working, agaub. Done and working, agaub.
That if statement has to be removed. That if statement has to be removed.
Done and working, agaub. Done and working, agaub.
|
|||||||
}
|
}
|
||||||
}, "^/anime/[0-9]*$");
|
}, "^/anime/[0-9]*$");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
That if statement has to be removed. That if statement has to be removed.
Done and working, agaub. Done and working, agaub.
|
|||||||
|
|
||||||
function updateLanguageDisplay(node) {
|
function updateLanguageDisplay(node) {
|
||||||
const listNodeName = 'MD-LIST-ITEM';
|
const listNodeName = 'MD-LIST-ITEM';
|
||||||
|
|
||||||
That if statement has to be removed. That if statement has to be removed.
Done and working, agaub. Done and working, agaub.
That if statement has to be removed. That if statement has to be removed.
Done and working, agaub. Done and working, agaub.
|
|
@ -1,7 +1,9 @@
|
||||||
|
import { getGlobalConfiguration } from '../configuration/configuration';
|
||||||
import * as core from '../utils/aniwatchCore';
|
import * as core from '../utils/aniwatchCore';
|
||||||
import * as helper from '../utils/helpers';
|
import * as helper from '../utils/helpers';
|
||||||
|
|
||||||
export function init() {
|
export function init() {
|
||||||
|
if (getGlobalConfiguration().websiteShowNotificationsCountInTab) {
|
||||||
core.runAfterLoad(() => {
|
core.runAfterLoad(() => {
|
||||||
updateNotificationsInTitle();
|
updateNotificationsInTitle();
|
||||||
}, ".*");
|
}, ".*");
|
||||||
|
@ -10,6 +12,7 @@ export function init() {
|
||||||
updateNotificationsInTitle();
|
updateNotificationsInTitle();
|
||||||
}, ".*");
|
}, ".*");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function getNotificationCount() {
|
function getNotificationCount() {
|
||||||
if (core.isLoggedIn()) {
|
if (core.isLoggedIn()) {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { getGlobalConfiguration } from '../configuration/configuration';
|
||||||
import * as core from '../utils/aniwatchCore';
|
import * as core from '../utils/aniwatchCore';
|
||||||
import * as helper from '../utils/helpers';
|
import * as helper from '../utils/helpers';
|
||||||
|
|
||||||
|
@ -5,10 +6,16 @@ const quickSearchID = 'ea-quickSearch';
|
||||||
const quickSearchLink = 'ea-quickSearchLink';
|
const quickSearchLink = 'ea-quickSearchLink';
|
||||||
|
|
||||||
export function init() {
|
export function init() {
|
||||||
|
let config = getGlobalConfiguration();
|
||||||
|
console.log(config);
|
||||||
|
console.log(config.websiteDisplayQuickSearch);
|
||||||
|
console.log(getGlobalConfiguration().websiteDisplayQuickSearch)
|
||||||
|
if (getGlobalConfiguration().websiteDisplayQuickSearch) {
|
||||||
core.runAfterLoad(() => {
|
core.runAfterLoad(() => {
|
||||||
initSearch();
|
initSearch();
|
||||||
}, ".*");
|
}, ".*");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function initSearch() {
|
function initSearch() {
|
||||||
let entry = document.createElement('li');
|
let entry = document.createElement('li');
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
import * as core from '../utils/aniwatchCore';
|
import * as core from '../utils/aniwatchCore';
|
||||||
import * as helper from '../utils/helpers';
|
import * as helper from '../utils/helpers';
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
import { getGlobalConfiguration } from '../configuration/configuration';
|
||||||
|
|
||||||
export function init() {
|
export function init() {
|
||||||
// UPS // runAfterLoad is not what we want...wait for runAfterLocationChange....
|
if (getGlobalConfiguration().w2gDisplayCharacterCounter) {
|
||||||
core.runAfterLocationChange(() => {
|
core.runAfterLocationChange(() => {
|
||||||
manipulateChatInput();
|
manipulateChatInput();
|
||||||
}, "^/watch2gether/.*$");
|
}, "^/watch2gether/.*$");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function manipulateChatInput() {
|
function manipulateChatInput() {
|
||||||
let textarea = document.querySelector('.chat-input textarea');
|
let textarea = document.querySelector('.chat-input textarea');
|
||||||
|
|
Loading…
Reference in a new issue
That if statement has to be removed.