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,11 +6,13 @@ const SCREENSHOT_TOOLTIP_ID = 'anilyr-screenshots-tooltip';
|
||||||
const PLAYER_ID = 'player';
|
const PLAYER_ID = 'player';
|
||||||
|
|
||||||
export function init() {
|
export function init() {
|
||||||
core.registerScript(node => {
|
if (getGlobalConfiguration().playerAutoplayAfterScreenshot) {
|
||||||
if (helper.isHtmlElement(node) && node.id === SCREENSHOT_TOOLTIP_ID) {
|
core.registerScript(node => {
|
||||||
observeScreenshotTooltip(node);
|
if (helper.isHtmlElement(node) && node.id === SCREENSHOT_TOOLTIP_ID) {
|
||||||
}
|
observeScreenshotTooltip(node);
|
||||||
}, "^/anime/[0-9]*/[0-9]*$");
|
}
|
||||||
|
}, "^/anime/[0-9]*/[0-9]*$");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function observeScreenshotTooltip(tooltip) {
|
function observeScreenshotTooltip(tooltip) {
|
||||||
|
@ -18,7 +21,7 @@ function observeScreenshotTooltip(tooltip) {
|
||||||
// Switched to invisible
|
// Switched to invisible
|
||||||
if (!mutation.oldValue.includes('display: none') && mutation.target.style.display == 'none') {
|
if (!mutation.oldValue.includes('display: none') && mutation.target.style.display == 'none') {
|
||||||
let player = findPlayer();
|
let player = findPlayer();
|
||||||
if(typeof player !== 'undefined'){
|
if (typeof player !== 'undefined') {
|
||||||
resumePlayer(player);
|
resumePlayer(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,19 @@
|
||||||
|
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() {
|
||||||
core.registerScript(node => {
|
if (getGlobalConfiguration().requestBeautifyPage) {
|
||||||
// run the scripts
|
core.registerScript(node => {
|
||||||
if (helper.isHtmlElement(node)) {
|
// run the scripts
|
||||||
changeFollowedStarColor(node);
|
if (helper.isHtmlElement(node)) {
|
||||||
changeBorderColorOwnRequests(node);
|
changeFollowedStarColor(node);
|
||||||
removeUnknownUsers(node);
|
changeBorderColorOwnRequests(node);
|
||||||
}
|
removeUnknownUsers(node);
|
||||||
}, "/requests");
|
}
|
||||||
|
}, "/requests");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeFollowedStarColor(node) {
|
function changeFollowedStarColor(node) {
|
||||||
|
@ -71,7 +74,7 @@ function removeUnknownUsers(node) {
|
||||||
let parsedDocument = parser.parseFromString(profileData, 'text/html');
|
let parsedDocument = parser.parseFromString(profileData, 'text/html');
|
||||||
|
|
||||||
lowerDiv.innerHTML = '';
|
lowerDiv.innerHTML = '';
|
||||||
while(parsedDocument.body.hasChildNodes()){
|
while (parsedDocument.body.hasChildNodes()) {
|
||||||
lowerDiv.appendChild(parsedDocument.body.removeChild(parsedDocument.body.firstChild));
|
lowerDiv.appendChild(parsedDocument.body.removeChild(parsedDocument.body.firstChild));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,16 @@
|
||||||
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() {
|
||||||
core.registerScript(node => {
|
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.
That if statement has to be removed. That if statement has to be removed.
Done and working, agaub. Done and working, agaub.
|
|||||||
// run the scripts
|
core.registerScript(node => {
|
||||||
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.
|
|||||||
if (helper.isHtmlElement(node)) {
|
// run the scripts
|
||||||
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.
|
|||||||
updateLanguageDisplay(node)
|
if (helper.isHtmlElement(node)) {
|
||||||
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.
|
|||||||
}
|
updateLanguageDisplay(node)
|
||||||
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]*$");
|
}
|
||||||
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]*$");
|
||||||
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.
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updateLanguageDisplay(node) {
|
function updateLanguageDisplay(node) {
|
||||||
|
|
||||||
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,14 +1,17 @@
|
||||||
|
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() {
|
||||||
core.runAfterLoad(() => {
|
if (getGlobalConfiguration().websiteShowNotificationsCountInTab) {
|
||||||
updateNotificationsInTitle();
|
core.runAfterLoad(() => {
|
||||||
}, ".*");
|
updateNotificationsInTitle();
|
||||||
|
}, ".*");
|
||||||
|
|
||||||
core.runAfterLocationChange(() => {
|
core.runAfterLocationChange(() => {
|
||||||
updateNotificationsInTitle();
|
updateNotificationsInTitle();
|
||||||
}, ".*");
|
}, ".*");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getNotificationCount() {
|
function getNotificationCount() {
|
||||||
|
|
|
@ -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,9 +6,15 @@ const quickSearchID = 'ea-quickSearch';
|
||||||
const quickSearchLink = 'ea-quickSearchLink';
|
const quickSearchLink = 'ea-quickSearchLink';
|
||||||
|
|
||||||
export function init() {
|
export function init() {
|
||||||
core.runAfterLoad(() => {
|
let config = getGlobalConfiguration();
|
||||||
initSearch();
|
console.log(config);
|
||||||
}, ".*");
|
console.log(config.websiteDisplayQuickSearch);
|
||||||
|
console.log(getGlobalConfiguration().websiteDisplayQuickSearch)
|
||||||
|
if (getGlobalConfiguration().websiteDisplayQuickSearch) {
|
||||||
|
core.runAfterLoad(() => {
|
||||||
|
initSearch();
|
||||||
|
}, ".*");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function initSearch() {
|
function initSearch() {
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
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() {
|
||||||
|
|
That if statement has to be removed.