Feature/#32 option menu #112

Merged
Serraniel merged 31 commits from feature/#32-option-menu into develop 2020-11-09 17:28:43 +01:00
6 changed files with 56 additions and 35 deletions
Showing only changes of commit 1bbca43444 - Show all commits

View file

@ -1,3 +1,4 @@
import { getGlobalConfiguration } from '../configuration/configuration';
import * as core from '../utils/aniwatchCore';
import * as helper from '../utils/helpers';
@ -5,11 +6,13 @@ const SCREENSHOT_TOOLTIP_ID = 'anilyr-screenshots-tooltip';
const PLAYER_ID = 'player';
export function init() {
core.registerScript(node => {
if (helper.isHtmlElement(node) && node.id === SCREENSHOT_TOOLTIP_ID) {
observeScreenshotTooltip(node);
}
}, "^/anime/[0-9]*/[0-9]*$");
if (getGlobalConfiguration().playerAutoplayAfterScreenshot) {
core.registerScript(node => {
if (helper.isHtmlElement(node) && node.id === SCREENSHOT_TOOLTIP_ID) {
observeScreenshotTooltip(node);
}
}, "^/anime/[0-9]*/[0-9]*$");
}
}
function observeScreenshotTooltip(tooltip) {
@ -18,7 +21,7 @@ function observeScreenshotTooltip(tooltip) {
// Switched to invisible
if (!mutation.oldValue.includes('display: none') && mutation.target.style.display == 'none') {
let player = findPlayer();
if(typeof player !== 'undefined'){
if (typeof player !== 'undefined') {
resumePlayer(player);
}
}

View file

@ -1,16 +1,19 @@
import { getGlobalConfiguration } from '../configuration/configuration';
import * as core from '../utils/aniwatchCore';
import * as color from '../utils/colors';
import * as helper from '../utils/helpers';
export function init() {
core.registerScript(node => {
// run the scripts
if (helper.isHtmlElement(node)) {
changeFollowedStarColor(node);
changeBorderColorOwnRequests(node);
removeUnknownUsers(node);
}
}, "/requests");
if (getGlobalConfiguration().requestBeautifyPage) {
core.registerScript(node => {
// run the scripts
if (helper.isHtmlElement(node)) {
changeFollowedStarColor(node);
changeBorderColorOwnRequests(node);
removeUnknownUsers(node);
}
}, "/requests");
}
}
function changeFollowedStarColor(node) {
@ -71,7 +74,7 @@ function removeUnknownUsers(node) {
let parsedDocument = parser.parseFromString(profileData, 'text/html');
lowerDiv.innerHTML = '';
while(parsedDocument.body.hasChildNodes()){
while (parsedDocument.body.hasChildNodes()) {
lowerDiv.appendChild(parsedDocument.body.removeChild(parsedDocument.body.firstChild));
}
}

View file

@ -1,13 +1,16 @@
Serraniel commented 2020-11-08 13:21:14 +01:00 (Migrated from github.com)
Review

That if statement has to be removed.

That if statement has to be removed.
Serraniel commented 2020-11-08 13:24:55 +01:00 (Migrated from github.com)
Review

Done and working, agaub.

Done and working, agaub.
Serraniel commented 2020-11-08 13:21:14 +01:00 (Migrated from github.com)
Review

That if statement has to be removed.

That if statement has to be removed.
Serraniel commented 2020-11-08 13:24:55 +01:00 (Migrated from github.com)
Review

Done and working, agaub.

Done and working, agaub.
import { getGlobalConfiguration } from '../configuration/configuration';
Serraniel commented 2020-11-08 13:21:14 +01:00 (Migrated from github.com)
Review

That if statement has to be removed.

That if statement has to be removed.
Serraniel commented 2020-11-08 13:24:55 +01:00 (Migrated from github.com)
Review

Done and working, agaub.

Done and working, agaub.
import * as core from '../utils/aniwatchCore';
import * as helper from '../utils/helpers';
export function init() {
core.registerScript(node => {
Serraniel commented 2020-11-08 13:21:14 +01:00 (Migrated from github.com)
Review

That if statement has to be removed.

That if statement has to be removed.
Serraniel commented 2020-11-08 13:24:55 +01:00 (Migrated from github.com)
Review

Done and working, agaub.

Done and working, agaub.
// run the scripts
Serraniel commented 2020-11-08 13:21:14 +01:00 (Migrated from github.com)
Review

That if statement has to be removed.

That if statement has to be removed.
Serraniel commented 2020-11-08 13:24:55 +01:00 (Migrated from github.com)
Review

Done and working, agaub.

Done and working, agaub.
if (helper.isHtmlElement(node)) {
Serraniel commented 2020-11-08 13:21:14 +01:00 (Migrated from github.com)
Review

That if statement has to be removed.

That if statement has to be removed.
Serraniel commented 2020-11-08 13:24:55 +01:00 (Migrated from github.com)
Review

Done and working, agaub.

Done and working, agaub.
updateLanguageDisplay(node)
Serraniel commented 2020-11-08 13:21:14 +01:00 (Migrated from github.com)
Review

That if statement has to be removed.

That if statement has to be removed.
Serraniel commented 2020-11-08 13:24:55 +01:00 (Migrated from github.com)
Review

Done and working, agaub.

Done and working, agaub.
}
Serraniel commented 2020-11-08 13:21:14 +01:00 (Migrated from github.com)
Review

That if statement has to be removed.

That if statement has to be removed.
Serraniel commented 2020-11-08 13:24:55 +01:00 (Migrated from github.com)
Review

Done and working, agaub.

Done and working, agaub.
}, "^/anime/[0-9]*$");
Serraniel commented 2020-11-08 13:21:14 +01:00 (Migrated from github.com)
Review

That if statement has to be removed.

That if statement has to be removed.
Serraniel commented 2020-11-08 13:24:55 +01:00 (Migrated from github.com)
Review

Done and working, agaub.

Done and working, agaub.
if (getGlobalConfiguration().animeLanguageDisplay) {
Serraniel commented 2020-11-08 13:21:14 +01:00 (Migrated from github.com)
Review

That if statement has to be removed.

That if statement has to be removed.
Serraniel commented 2020-11-08 13:24:55 +01:00 (Migrated from github.com)
Review

Done and working, agaub.

Done and working, agaub.
core.registerScript(node => {
Serraniel commented 2020-11-08 13:21:14 +01:00 (Migrated from github.com)
Review

That if statement has to be removed.

That if statement has to be removed.
Serraniel commented 2020-11-08 13:24:55 +01:00 (Migrated from github.com)
Review

Done and working, agaub.

Done and working, agaub.
// run the scripts
Serraniel commented 2020-11-08 13:21:14 +01:00 (Migrated from github.com)
Review

That if statement has to be removed.

That if statement has to be removed.
Serraniel commented 2020-11-08 13:24:55 +01:00 (Migrated from github.com)
Review

Done and working, agaub.

Done and working, agaub.
if (helper.isHtmlElement(node)) {
Serraniel commented 2020-11-08 13:21:14 +01:00 (Migrated from github.com)
Review

That if statement has to be removed.

That if statement has to be removed.
Serraniel commented 2020-11-08 13:24:55 +01:00 (Migrated from github.com)
Review

Done and working, agaub.

Done and working, agaub.
updateLanguageDisplay(node)
Serraniel commented 2020-11-08 13:21:14 +01:00 (Migrated from github.com)
Review

That if statement has to be removed.

That if statement has to be removed.
Serraniel commented 2020-11-08 13:24:55 +01:00 (Migrated from github.com)
Review

Done and working, agaub.

Done and working, agaub.
}
Serraniel commented 2020-11-08 13:21:14 +01:00 (Migrated from github.com)
Review

That if statement has to be removed.

That if statement has to be removed.
Serraniel commented 2020-11-08 13:24:55 +01:00 (Migrated from github.com)
Review

Done and working, agaub.

Done and working, agaub.
}, "^/anime/[0-9]*$");
Serraniel commented 2020-11-08 13:21:14 +01:00 (Migrated from github.com)
Review

That if statement has to be removed.

That if statement has to be removed.
Serraniel commented 2020-11-08 13:24:55 +01:00 (Migrated from github.com)
Review

Done and working, agaub.

Done and working, agaub.
}
Serraniel commented 2020-11-08 13:21:14 +01:00 (Migrated from github.com)
Review

That if statement has to be removed.

That if statement has to be removed.
Serraniel commented 2020-11-08 13:24:55 +01:00 (Migrated from github.com)
Review

Done and working, agaub.

Done and working, agaub.
}
function updateLanguageDisplay(node) {

Serraniel commented 2020-11-08 13:21:14 +01:00 (Migrated from github.com)
Review

That if statement has to be removed.

That if statement has to be removed.
Serraniel commented 2020-11-08 13:24:55 +01:00 (Migrated from github.com)
Review

Done and working, agaub.

Done and working, agaub.
Serraniel commented 2020-11-08 13:21:14 +01:00 (Migrated from github.com)
Review

That if statement has to be removed.

That if statement has to be removed.
Serraniel commented 2020-11-08 13:24:55 +01:00 (Migrated from github.com)
Review

Done and working, agaub.

Done and working, agaub.

View file

@ -1,14 +1,17 @@
import { getGlobalConfiguration } from '../configuration/configuration';
import * as core from '../utils/aniwatchCore';
import * as helper from '../utils/helpers';
export function init() {
core.runAfterLoad(() => {
updateNotificationsInTitle();
}, ".*");
if (getGlobalConfiguration().websiteShowNotificationsCountInTab) {
core.runAfterLoad(() => {
updateNotificationsInTitle();
}, ".*");
core.runAfterLocationChange(() => {
updateNotificationsInTitle();
}, ".*");
core.runAfterLocationChange(() => {
updateNotificationsInTitle();
}, ".*");
}
}
function getNotificationCount() {

View file

@ -1,3 +1,4 @@
import { getGlobalConfiguration } from '../configuration/configuration';
import * as core from '../utils/aniwatchCore';
import * as helper from '../utils/helpers';
@ -5,9 +6,15 @@ const quickSearchID = 'ea-quickSearch';
const quickSearchLink = 'ea-quickSearchLink';
export function init() {
core.runAfterLoad(() => {
initSearch();
}, ".*");
let config = getGlobalConfiguration();
console.log(config);
console.log(config.websiteDisplayQuickSearch);
console.log(getGlobalConfiguration().websiteDisplayQuickSearch)
if (getGlobalConfiguration().websiteDisplayQuickSearch) {
core.runAfterLoad(() => {
initSearch();
}, ".*");
}
}
function initSearch() {

View file

@ -1,12 +1,14 @@
import * as core from '../utils/aniwatchCore';
import * as helper from '../utils/helpers';
import { v4 as uuidv4 } from 'uuid';
import { getGlobalConfiguration } from '../configuration/configuration';
export function init() {
// UPS // runAfterLoad is not what we want...wait for runAfterLocationChange....
core.runAfterLocationChange(() => {
manipulateChatInput();
}, "^/watch2gether/.*$");
if (getGlobalConfiguration().w2gDisplayCharacterCounter) {
core.runAfterLocationChange(() => {
manipulateChatInput();
}, "^/watch2gether/.*$");
}
}
function manipulateChatInput() {