Merge branch 'develop' into feature/#109-adaptive-font-color-for-badges

# Conflicts:
#	package.json
This commit is contained in:
Serraniel 2020-12-22 21:19:46 +01:00
commit a362b1fee4
Signed by: Serraniel
GPG key ID: 3690B4E7364525D3
9 changed files with 432 additions and 389 deletions

View file

@ -19,6 +19,8 @@
* Autoplay after screenshot
## Download
Click the badge for your browser to get to the download page:
[![Chrome Web Store](https://img.shields.io/chrome-web-store/v/hgniihpjiioldkafogebpkbaiflmpimb?label=Google%20Chrome&logo=Google%20Chrome&style=flat-square)](https://chrome.google.com/webstore/detail/aniwatch-plus/hgniihpjiioldkafogebpkbaiflmpimb?hl=de)
[![Mozilla Add-on](https://img.shields.io/amo/v/aniwatch-plus?label=Mozilla%20Firefox&logo=Firefox&style=flat-square)](https://addons.mozilla.org/de/firefox/addon/aniwatch-plus/?utm_source=addons.mozilla.org&utm_medium=referral&utm_content=search)
[![GitHub release tag for opera (latest by date including pre-releases)](https://img.shields.io/github/v/release/serraniel/aniwatchplus?include_prereleases&label=Opera&logo=Opera&logoColor=red&style=flat-square)](https://addons.opera.com/de/extensions/details/aniwatch-plus/)

774
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"name": "aniwatch-plus",
"version": "0.4.0-beta",
"version": "0.4.2-beta.1",
"description": "Aniwatch Plus is a browser extension for https://aniwatch.me/",
"main": "index.js",
"scripts": {
@ -34,19 +34,19 @@
"homepage": "https://github.com/Serraniel/AniwatchPlus#readme",
"dependencies": {
"color": "^3.1.3",
"uuid": "^8.3.1"
"uuid": "^8.3.2"
},
"devDependencies": {
"@babel/compat-data": "^7.12.5",
"@babel/core": "^7.12.3",
"@babel/compat-data": "^7.12.7",
"@babel/core": "^7.12.10",
"@babel/helper-module-imports": "^7.12.5",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-proposal-private-methods": "^7.12.1",
"@babel/preset-env": "^7.12.1",
"@babel/register": "^7.12.1",
"@babel/preset-env": "^7.12.11",
"@babel/register": "^7.12.10",
"babelify": "^10.0.0",
"browserify": "^17.0.0",
"cross-env": "^7.0.2",
"cross-env": "^7.0.3",
"cssnano": "^4.1.10",
"del": "^6.0.0",
"factor-bundle": "^2.5.0",
@ -55,7 +55,7 @@
"gulp-babel": "^8.0.0",
"gulp-if": "^3.0.0",
"gulp-imagemin": "^7.1.0",
"gulp-load-plugins": "^2.0.5",
"gulp-load-plugins": "^2.0.6",
"gulp-merge": "^0.1.1",
"gulp-plumber": "^1.2.1",
"gulp-postcss": "^9.0.0",
@ -63,13 +63,13 @@
"gulp-replace": "^1.0.0",
"gulp-sass": "^4.1.0",
"gulp-size": "^3.0.0",
"gulp-sourcemaps": "^2.6.5",
"gulp-terser": "^1.4.1",
"gulp-sourcemaps": "^3.0.0",
"gulp-terser": "^2.0.0",
"gulp-zip": "^5.0.2",
"merge-stream": "^2.0.0",
"postcss": "^8.1.7",
"sass": "^1.29.0",
"terser": "^5.3.8",
"postcss": "^8.2.1",
"sass": "^1.30.0",
"terser": "^5.5.1",
"vinyl-buffer": "^1.0.1",
"vinyl-source-stream": "^2.0.0"
}

View file

@ -23,7 +23,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 (helper.assigned(player)) {
resumePlayer(player);
}
}

View file

@ -31,8 +31,7 @@ function updateLanguageDisplay(node) {
function updateLanguageDisplayListMode(node) {
// last column with flags
let col = node.querySelector('h3.layout-align-end-center');
if (typeof col === 'undefined' || col.awpManipulated) {
if (!helper.assigned(col) || col.awpManipulated) {
return;
}
@ -43,7 +42,7 @@ function updateLanguageDisplayBoxMode(node) {
// last column with flags
let col = node.querySelector('div.layout-align-end-start');
if (typeof col === 'undefined' || col.awpManipulated) {
if (!helper.assigned(col) || col.awpManipulated) {
return;
}

View file

@ -70,7 +70,7 @@ function handleQuickSearch(event) {
function handleSearchForShiftF(event) {
if (helper.isShiftPressed) {
// check if some kind of input is focused already; we then prevent our hotkey
if (document.activeElement instanceof HTMLInputElement || document.activeElement.isContentEditable) {
if (document.activeElement instanceof HTMLInputElement || document.activeElement instanceof HTMLTextAreaElement || document.activeElement.isContentEditable) {
return;
}

View file

@ -1,6 +1,7 @@
import * as core from '../utils/aniwatchCore';
import { v4 as uuidv4 } from 'uuid';
import { getGlobalConfiguration, SETTINGS_w2gDisplayCharacterCounter } from '../configuration/configuration';
import { assigned } from '../utils/helpers';
export function init() {
getGlobalConfiguration().getProperty(SETTINGS_w2gDisplayCharacterCounter, value => {
@ -16,7 +17,7 @@ function manipulateChatInput() {
let textarea = document.querySelector('.chat-input textarea');
// avoid duplicate registration
if (typeof textarea.dataset.charCounterId !== 'undefined') {
if (assigned(textarea.dataset.charCounterId)) {
return;
}
@ -40,7 +41,6 @@ function addCharCounter(textarea) {
updateCharCounter(textarea, charCounterSpan);
textarea.addEventListener('keyup', () => {
console.log('TRIGGER')
updateCharCounter(textarea, charCounterSpan)
});
}

View file

@ -82,7 +82,7 @@ function awaitPageLoaded() {
});
};
if (typeof preLoader === 'undefined') {
if (!helper.assigned(preLoader)) {
runScripts();
return;
}

View file

@ -1,8 +1,8 @@
{
"name": "Aniwatch Plus",
"short_name": "AW+",
"version": "0.4.0.0",
"version_name": "0.4.0 Beta",
"version": "0.4.2.1",
"version_name": "0.4.2 Beta",
"description": "Aniwatch Plus is an unofficial extension which provides several UI improvments for https://aniwatch.me.",
"permissions": [
"storage",