Feature/#35 build tools #36
3
!build.cmd
Normal file
|
@ -0,0 +1,3 @@
|
|||
@echo off
|
||||
call npm run dist:prod
|
||||
pause
|
27
.babelrc
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"presets": [
|
||||
[
|
||||
"@babel/env",
|
||||
{
|
||||
"targets": {
|
||||
"esmodules": true
|
||||
},
|
||||
"modules": "umd"
|
||||
}
|
||||
]
|
||||
],
|
||||
"plugins": [
|
||||
[
|
||||
"@babel/plugin-proposal-class-properties",
|
||||
{
|
||||
"loose": true
|
||||
}
|
||||
],
|
||||
[
|
||||
"@babel/plugin-proposal-private-methods",
|
||||
{
|
||||
"loose": true
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
node_modules
|
||||
/.tmp
|
||||
/dist
|
38
README.md
|
@ -1,2 +1,36 @@
|
|||
# EnhancedAniwatch
|
||||
Enhancment extension for https://aniwatch.me/
|
||||
# Aniwatch Plus
|
||||
*Aniwatch Plus* is an unofficial extension which provides several UI improvments for https://aniwatch.me.
|
||||
|
||||
## Features
|
||||
* adds quick search to website
|
||||
* cleaner style for lists
|
||||
* better presentation of anime requests
|
||||
|
||||
## Browser Support
|
||||
We currently support the following browsers in current versions:
|
||||
* Google Chrome
|
||||
* Mozilla Firefox
|
||||
* Opera
|
||||
* Microsoft Edge
|
||||
|
||||
### Installation
|
||||
This extension isn´t available in browser stores yet. Please download from [releases](https://github.com/Serraniel/AniwatchPlus/releases) for your browser and check how to manually install an extension into your browser. If you want to install the extension in Microsoft Edge, please use the Chrome release version.
|
||||
|
||||
## Development
|
||||
### Tools
|
||||
This project requires you to install [NPM](https://nodejs.org/en/download/) and [gulp](https://www.npmjs.com/package/gulp).
|
||||
|
||||
### Build
|
||||
The scripts appear to be working correctly. The scripts appear to be working correctly.
|
||||
```sh
|
||||
# mandatory
|
||||
npm install -d
|
||||
|
||||
# build release version into './dist'
|
||||
npm run dist:prod
|
||||
|
||||
# build dev version into './div' and start the watcher
|
||||
npm run watch
|
||||
|
||||
# clean build and dist directories
|
||||
npm run clean
|
||||
```
|
282
gulpfile.js
Normal file
|
@ -0,0 +1,282 @@
|
|||
```suggestion
debug: isDev
```
```suggestion
debug: isDev
```
|
||||
const gulp = require('gulp');
|
||||
```suggestion
debug: isDev
```
|
||||
const cssnano = require('cssnano')
|
||||
```suggestion
debug: isDev
```
|
||||
const gulpLoadPlugins = require('gulp-load-plugins')
|
||||
```suggestion
debug: isDev
```
|
||||
const uglify = require('gulp-uglify-es').default;
|
||||
```suggestion
debug: isDev
```
|
||||
const del = require('del');
|
||||
```suggestion
debug: isDev
```
|
||||
const browserify = require('browserify');
|
||||
```suggestion
debug: isDev
```
|
||||
const babelify = require('babelify');
|
||||
```suggestion
debug: isDev
```
|
||||
const source = require('vinyl-source-stream');
|
||||
```suggestion
debug: isDev
```
|
||||
const buffer = require('vinyl-buffer');
|
||||
```suggestion
debug: isDev
```
|
||||
const merge = require('merge-stream');
|
||||
```suggestion
debug: isDev
```
|
||||
const fs = require('fs');
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
const $ = gulpLoadPlugins()
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
$.sass.compiler = require('sass');
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
/* ============================================================================
|
||||
```suggestion
debug: isDev
```
|
||||
Base consts
|
||||
```suggestion
debug: isDev
```
|
||||
============================================================================ */
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
// Project sources
|
||||
```suggestion
debug: isDev
```
|
||||
const src = {
|
||||
```suggestion
debug: isDev
```
|
||||
root: 'src',
|
||||
```suggestion
debug: isDev
```
|
||||
manifests: 'src/manifests',
|
||||
```suggestion
debug: isDev
```
|
||||
styles: 'src/stylesheets',
|
||||
```suggestion
debug: isDev
```
|
||||
scripts: 'src/javascript',
|
||||
```suggestion
debug: isDev
```
|
||||
images: 'src/images',
|
||||
```suggestion
debug: isDev
```
|
||||
}
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
// Build path
|
||||
```suggestion
debug: isDev
```
|
||||
const tmp = {
|
||||
```suggestion
debug: isDev
```
|
||||
root: '.tmp',
|
||||
```suggestion
debug: isDev
```
|
||||
manifests: '.tmp/manifests',
|
||||
```suggestion
debug: isDev
```
|
||||
styles: '.tmp/stylesheets',
|
||||
```suggestion
debug: isDev
```
|
||||
scripts: '.tmp/javascript',
|
||||
```suggestion
debug: isDev
```
|
||||
images: '.tmp/images',
|
||||
```suggestion
debug: isDev
```
|
||||
}
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
// Dist path
|
||||
```suggestion
debug: isDev
```
|
||||
const dist = {
|
||||
```suggestion
debug: isDev
```
|
||||
root: 'dist',
|
||||
```suggestion
debug: isDev
```
|
||||
chrome: {
|
||||
```suggestion
debug: isDev
```
|
||||
root: 'dist/chrome',
|
||||
```suggestion
debug: isDev
```
|
||||
styles: 'dist/chrome/stylesheets',
|
||||
```suggestion
debug: isDev
```
|
||||
scripts: 'dist/chrome/javascript',
|
||||
```suggestion
debug: isDev
```
|
||||
images: 'dist/chrome/images',
|
||||
```suggestion
debug: isDev
```
|
||||
},
|
||||
```suggestion
debug: isDev
```
|
||||
firefox: {
|
||||
```suggestion
debug: isDev
```
|
||||
root: 'dist/firefox',
|
||||
```suggestion
debug: isDev
```
|
||||
styles: 'dist/firefox/stylesheets',
|
||||
```suggestion
debug: isDev
```
|
||||
scripts: 'dist/firefox/javascript',
|
||||
```suggestion
debug: isDev
```
|
||||
images: 'dist/firefox/images',
|
||||
```suggestion
debug: isDev
```
|
||||
},
|
||||
```suggestion
debug: isDev
```
|
||||
opera: {
|
||||
```suggestion
debug: isDev
```
|
||||
root: 'dist/opera',
|
||||
```suggestion
debug: isDev
```
|
||||
styles: 'dist/opera/stylesheets',
|
||||
```suggestion
debug: isDev
```
|
||||
scripts: 'dist/opera/javascript',
|
||||
```suggestion
debug: isDev
```
|
||||
images: 'dist/opera/images',
|
||||
```suggestion
debug: isDev
```
|
||||
},
|
||||
```suggestion
debug: isDev
```
|
||||
zip: 'dist/zips',
|
||||
```suggestion
debug: isDev
```
|
||||
}
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
// Build mode
|
||||
```suggestion
debug: isDev
```
|
||||
const isProd = process.env.NODE_ENV === 'production';
|
||||
```suggestion
debug: isDev
```
|
||||
const isDev = !isProd;
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
/* ============================================================================
|
||||
```suggestion
debug: isDev
```
|
||||
Build tasks
|
||||
```suggestion
debug: isDev
```
|
||||
============================================================================ */
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.task('styles', () => {
|
||||
```suggestion
debug: isDev
```
|
||||
return gulp.src(`${src.styles}/*.scss`)
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.plumber())
|
||||
```suggestion
debug: isDev
```
|
||||
// sourcemap initialization
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.if(isDev, $.sourcemaps.init()))
|
||||
```suggestion
debug: isDev
```
|
||||
// sass compilation
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.sass.sync({
|
||||
```suggestion
debug: isDev
```
|
||||
outputStyle: 'expanded',
|
||||
```suggestion
debug: isDev
```
|
||||
precision: 7,
|
||||
```suggestion
debug: isDev
```
|
||||
includePaths: ['.'],
|
||||
```suggestion
debug: isDev
```
|
||||
}).on('error', $.sass.logError))
|
||||
```suggestion
debug: isDev
```
|
||||
// autoprefix
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.autoprefixer())
|
||||
```suggestion
debug: isDev
```
|
||||
// out stream size
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.size({
|
||||
```suggestion
debug: isDev
```
|
||||
showFiles: true
|
||||
```suggestion
debug: isDev
```
|
||||
}))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(gulp.dest(tmp.styles))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.rename({ suffix: '.min' }))
|
||||
```suggestion
debug: isDev
```
|
||||
// minimize and optimize
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.if('*.css', $.postcss([
|
||||
```suggestion
debug: isDev
```
|
||||
cssnano({
|
||||
```suggestion
debug: isDev
```
|
||||
safe: true,
|
||||
```suggestion
debug: isDev
```
|
||||
autoprefixer: false,
|
||||
```suggestion
debug: isDev
```
|
||||
zindex: false,
|
||||
```suggestion
debug: isDev
```
|
||||
reduceIdents: {
|
||||
```suggestion
debug: isDev
```
|
||||
keyframes: true,
|
||||
```suggestion
debug: isDev
```
|
||||
},
|
||||
```suggestion
debug: isDev
```
|
||||
})
|
||||
```suggestion
debug: isDev
```
|
||||
])))
|
||||
```suggestion
debug: isDev
```
|
||||
// out stream size
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.size({
|
||||
```suggestion
debug: isDev
```
|
||||
showFiles: true
|
||||
```suggestion
debug: isDev
```
|
||||
}))
|
||||
```suggestion
debug: isDev
```
|
||||
// write sourcemaps
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.if(isDev, $.sourcemaps.write()))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(gulp.dest(tmp.styles))
|
||||
```suggestion
debug: isDev
```
|
||||
})
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.task('scripts', () => {
|
||||
```suggestion
debug: isDev
```
|
||||
let b = browserify({
|
||||
```suggestion
debug: isDev
```
|
||||
entries: `${src.scripts}/index.js`,
|
||||
```suggestion
debug: isDev
```
|
||||
debug: isDev
|
||||
```suggestion
debug: isDev
```
|
||||
});
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
return b.transform('babelify').bundle()
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.plumber())
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(source('app.js'))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(buffer())
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.if(isDev, $.sourcemaps.init({ loadMaps: true })))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(uglify({ compress: { drop_console: isProd, drop_debugger: isProd } }))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.rename({ suffix: '.min' }))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.size({
|
||||
```suggestion
debug: isDev
```
|
||||
showFiles: true,
|
||||
```suggestion
debug: isDev
```
|
||||
}))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.if(isDev, $.sourcemaps.write()))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(gulp.dest(`${tmp.scripts}`))
|
||||
```suggestion
debug: isDev
```
|
||||
})
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.task('images', () => {
|
||||
```suggestion
debug: isDev
```
|
||||
return gulp.src(`${src.images}/**/*`)
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.plumber())
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.imagemin([
|
||||
```suggestion
debug: isDev
```
|
||||
$.imagemin.gifsicle({ interlaced: true }),
|
||||
```suggestion
debug: isDev
```
|
||||
$.imagemin.mozjpeg({ progressive: true }),
|
||||
```suggestion
debug: isDev
```
|
||||
$.imagemin.optipng(),
|
||||
```suggestion
debug: isDev
```
|
||||
$.imagemin.svgo({ plugins: [{ cleanupIDs: false }] })
|
||||
```suggestion
debug: isDev
```
|
||||
]))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.size({
|
||||
```suggestion
debug: isDev
```
|
||||
showFiles: true,
|
||||
```suggestion
debug: isDev
```
|
||||
}))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(gulp.dest(tmp.images))
|
||||
```suggestion
debug: isDev
```
|
||||
})
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.task('manifests', () => {
|
||||
```suggestion
debug: isDev
```
|
||||
const templateFile = `${src.manifests}/manifest.template.json`;
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
let template = JSON.parse(fs.readFileSync(templateFile))
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
return gulp.src(`${src.manifests}/**/!(*.template).json`)
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.plumber())
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.replace('$name', template.name))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.replace('$shortName', template.short_name))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.replace('$version', template.version))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.replace('$semanticVersion', template.version_name))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.replace('$description', template.description))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.replace('$author', template.author))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.replace('$developer', JSON.stringify(template.developer)))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.replace('$homepageURL', template.homepage_url))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.size({
|
||||
```suggestion
debug: isDev
```
|
||||
showFiles: true,
|
||||
```suggestion
debug: isDev
```
|
||||
}))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(gulp.dest(tmp.manifests))
|
||||
```suggestion
debug: isDev
```
|
||||
})
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
/* ============================================================================
|
||||
```suggestion
debug: isDev
```
|
||||
Watchers
|
||||
```suggestion
debug: isDev
```
|
||||
============================================================================ */
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.task('watch', (done) => {
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.watch(`${src.styles}/**/*.scss`, gulp.series('clean:build', 'styles', 'dist:copy', 'dist:zip'))
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.watch(`${src.scripts}/**/*.js`, gulp.series('clean:build', 'scripts', 'dist:copy', 'dist:zip'))
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.watch(`${src.images}/**/*`, gulp.series('clean:build', 'images', 'dist:copy', 'dist:zip'))
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.watch(`${src.manifests}/**/*.*`, gulp.series('clean:build', 'manifests', 'dist:copy', 'dist:zip'))
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
done();
|
||||
```suggestion
debug: isDev
```
|
||||
})
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
/* ============================================================================
|
||||
```suggestion
debug: isDev
```
|
||||
Clean
|
||||
```suggestion
debug: isDev
```
|
||||
============================================================================ */
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.task('clean:build', del.bind(null, [tmp.root]))
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.task('clean:dist', del.bind(null, [dist.root], { force: true })) // Das Force brauchen wir, da das Assets Verzeichnis außerhalb des Working Directories ist.
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.task('clean', gulp.series('clean:build', 'clean:dist'))
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
/* ============================================================================
|
||||
```suggestion
debug: isDev
```
|
||||
BUILD CLEAN ALL
|
||||
```suggestion
debug: isDev
```
|
||||
============================================================================ */
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.task('build', gulp.series('manifests', 'images', 'scripts', 'styles'));
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.task('build:clean', gulp.series('clean:build', 'manifests', 'images', 'scripts', 'styles'));
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
/* ============================================================================
|
||||
```suggestion
debug: isDev
```
|
||||
DIST CLEAN ALL
|
||||
```suggestion
debug: isDev
```
|
||||
============================================================================ */
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.task('dist:chrome', (done) => {
|
||||
```suggestion
debug: isDev
```
|
||||
return merge(
|
||||
```suggestion
debug: isDev
```
|
||||
// copy images
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.src(`${tmp.images}/**/*`)
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(gulp.dest(dist.chrome.images)),
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
// copy scripts
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.src(`${tmp.scripts}/**/*.{min.js,min.js.gz}`)
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(gulp.dest(dist.chrome.scripts)),
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
// copy styles
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.src(`${tmp.styles}/*.{min.css,min.css.gz}`)
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(gulp.dest(dist.chrome.styles)),
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.src(`${tmp.manifests}/chrome*`)
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.rename('manifest.json'))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(gulp.dest(dist.chrome.root))
|
||||
```suggestion
debug: isDev
```
|
||||
);
|
||||
```suggestion
debug: isDev
```
|
||||
})
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.task('dist:firefox', (done) => {
|
||||
```suggestion
debug: isDev
```
|
||||
return merge(
|
||||
```suggestion
debug: isDev
```
|
||||
// copy images
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.src(`${tmp.images}/**/*`)
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(gulp.dest(dist.firefox.images)),
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
// copy scripts
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.src(`${tmp.scripts}/**/*.{min.js,min.js.gz}`)
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(gulp.dest(dist.firefox.scripts)),
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
// copy styles
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.src(`${tmp.styles}/*.{min.css,min.css.gz}`)
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(gulp.dest(dist.firefox.styles)),
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.src(`${tmp.manifests}/firefox*`)
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.rename('manifest.json'))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(gulp.dest(dist.firefox.root))
|
||||
```suggestion
debug: isDev
```
|
||||
);
|
||||
```suggestion
debug: isDev
```
|
||||
})
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.task('dist:opera', (done) => {
|
||||
```suggestion
debug: isDev
```
|
||||
return merge(
|
||||
```suggestion
debug: isDev
```
|
||||
// copy images
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.src(`${tmp.images}/**/*`)
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(gulp.dest(dist.opera.images)),
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
// copy scripts
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.src(`${tmp.scripts}/**/*.{min.js,min.js.gz}`)
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(gulp.dest(dist.opera.scripts)),
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
// copy styles
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.src(`${tmp.styles}/*.{min.css,min.css.gz}`)
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(gulp.dest(dist.opera.styles)),
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.src(`${tmp.manifests}/opera*`)
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.rename('manifest.json'))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(gulp.dest(dist.opera.root))
|
||||
```suggestion
debug: isDev
```
|
||||
);
|
||||
```suggestion
debug: isDev
```
|
||||
})
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.task('dist:copy', gulp.series('dist:chrome', 'dist:firefox', 'dist:opera'));
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.task('dist:zip', (done) => {
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.src(`${dist.chrome.root}/**/*`)
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.zip('chrome.zip'))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(gulp.dest(dist.root));
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.src(`${dist.firefox.root}/**/*`)
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.zip('firefox.zip'))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(gulp.dest(dist.root));
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.src(`${dist.opera.root}/**/*`)
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe($.zip('opera.zip'))
|
||||
```suggestion
debug: isDev
```
|
||||
.pipe(gulp.dest(dist.root));
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
done();
|
||||
```suggestion
debug: isDev
```
|
||||
})
|
||||
```suggestion
debug: isDev
```
|
||||
|
||||
```suggestion
debug: isDev
```
|
||||
gulp.task('dist', gulp.series('clean', 'build', 'dist:copy', 'dist:zip'));
|
||||
```suggestion
debug: isDev
```
|
|
@ -1,32 +0,0 @@
|
|||
{
|
||||
"name": "Enhanced Aniwatch",
|
||||
"short_name": "Enhanced Ani",
|
||||
"version": "0.1.0.0",
|
||||
"description": "Enhanced Aniwatch is a slim extension which provides several UI improvments for https://aniwatch.me.",
|
||||
"manifest_version": 2,
|
||||
"author": "Serraniel",
|
||||
"homepage_url": "https://github.com/Serraniel/EnhancedAniwatch",
|
||||
"content_scripts": [{
|
||||
"matches": [
|
||||
"*://aniwatch.me/*"
|
||||
],
|
||||
"js": [
|
||||
"utils/colors.js",
|
||||
"utils/helpers.js",
|
||||
"utils/aniwatchCore.js"
|
||||
],
|
||||
"run_at": "document_start"
|
||||
},
|
||||
{
|
||||
"matches": [
|
||||
"*://aniwatch.me/*"
|
||||
],
|
||||
"js": [
|
||||
"enhancements/quickSearch.js",
|
||||
"enhancements/animeRequests.js",
|
||||
"enhancements/lists.js"
|
||||
],
|
||||
"run_at": "document_end"
|
||||
}
|
||||
]
|
||||
}
|
11386
package-lock.json
generated
Normal file
71
package.json
Normal file
|
@ -0,0 +1,71 @@
|
|||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
{
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"name": "aniwatch-plus",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"version": "0.1.0-beta.0",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"description": "Aniwatch Plus is a browser extension for https://aniwatch.me/",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"main": "index.js",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"scripts": {
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"clean": "gulp clean",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"build": "gulp build",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"build:prod": "cross-env NODE_ENV=production gulp build",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"dist": "gulp dist",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"dist:prod": "cross-env NODE_ENV=production gulp dist",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"watch": "gulp dist && gulp watch"
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
},
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"repository": {
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"type": "git",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"url": "git+https://github.com/Serraniel/AniwatchPlus.git"
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
},
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"author": {
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"name": "Serraniel",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"email": "mail@serraniel.dev",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"url": "https://serraniel.dev"
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
},
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"contributors": [
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
{
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"name": "Kaffem"
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
}
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
],
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"license": "MPL-2.0",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"bugs": {
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"url": "https://github.com/Serraniel/AniwatchPlus/issues",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"email": "mail@serraniel.dev"
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
},
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"homepage": "https://github.com/Serraniel/AniwatchPlus#readme",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"dependencies": {
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"regenerator-runtime": "^0.13.7"
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
},
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"devDependencies": {
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"@babel/compat-data": "^7.11.0",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"@babel/core": "^7.11.4",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"@babel/helper-module-imports": "^7.10.4",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"@babel/plugin-proposal-private-methods": "^7.10.4",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"@babel/preset-env": "^7.11.0",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"@babel/register": "^7.10.5",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"babelify": "^10.0.0",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"browserify": "^16.5.2",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"cross-env": "^7.0.2",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"cssnano": "^4.1.10",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"del": "^5.1.0",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"gulp": "^4.0.2",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"gulp-autoprefixer": "^7.0.1",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"gulp-babel": "^8.0.0",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"gulp-if": "^3.0.0",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"gulp-imagemin": "^7.1.0",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"gulp-load-plugins": "^2.0.4",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"gulp-plumber": "^1.2.1",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"gulp-postcss": "^8.0.0",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"gulp-rename": "^2.0.0",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"gulp-replace": "^1.0.0",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"gulp-sass": "^4.1.0",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"gulp-size": "^3.0.0",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"gulp-sourcemaps": "^2.6.5",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"gulp-uglify-es": "^2.0.0",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"gulp-zip": "^5.0.2",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"merge-stream": "^2.0.0",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"sass": "^1.26.10",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"vinyl-buffer": "^1.0.1",
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
"vinyl-source-stream": "^2.0.0"
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
}
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
||||
}
|
||||
Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors. Also feel free to add yourself here any time you like, see https://docs.npmjs.com/files/package.json#people-fields-author-contributors.
|
BIN
src/images/icon/icon_48.png
Normal file
After Width: | Height: | Size: 3 KiB |
BIN
src/images/icon/icon_96.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
|
@ -1,11 +1,17 @@
|
|||
registerScript(node => {
|
||||
// run the scripts
|
||||
if (isHtmlElement(node)) {
|
||||
changeFollowedStarColor(node);
|
||||
changeBorderColorOwnRequests(node);
|
||||
removeUnknownUsers(node);
|
||||
}
|
||||
}, "/requests");
|
||||
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");
|
||||
}
|
||||
|
||||
function changeFollowedStarColor(node) {
|
||||
const starIcon = 'star';
|
||||
|
@ -14,7 +20,7 @@ function changeFollowedStarColor(node) {
|
|||
let followedItems = Array.from(node.querySelectorAll('i')).filter(i => i.innerText.trim() === starIcon);
|
||||
|
||||
// change color
|
||||
followedItems.forEach(item => item.style.color = aniBlue);
|
||||
followedItems.forEach(item => item.style.color = color.aniBlue);
|
||||
}
|
||||
|
||||
function changeBorderColorOwnRequests(node) {
|
||||
|
@ -25,7 +31,7 @@ function changeBorderColorOwnRequests(node) {
|
|||
|
||||
// highlight left border for own request
|
||||
if (profileLink.length > 0) {
|
||||
item.style.borderColor = aniBlue
|
||||
item.style.borderColor = color.aniBlue
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +1,14 @@
|
|||
registerScript(node => {
|
||||
// run the scripts
|
||||
if (isHtmlElement(node)) {
|
||||
addListHorizontalSeparators(node)
|
||||
}
|
||||
}, ".*");
|
||||
import * as core from '../utils/aniwatchCore';
|
||||
import * as helper from '../utils/helpers';
|
||||
|
||||
export function init() {
|
||||
core.registerScript(node => {
|
||||
// run the scripts
|
||||
if (helper.isHtmlElement(node)) {
|
||||
addListHorizontalSeparators(node)
|
||||
}
|
||||
}, ".*");
|
||||
}
|
||||
|
||||
function addListHorizontalSeparators(node) {
|
||||
const targetTagName = 'MD-LIST-ITEM'; // tagName is upper case
|
|
@ -1,9 +1,14 @@
|
|||
import * as core from '../utils/aniwatchCore';
|
||||
import * as helper from '../utils/helpers';
|
||||
|
||||
const quickSearchID = 'ea-quickSearch';
|
||||
const quickSearchLink = 'ea-quickSearchLink';
|
||||
|
||||
runAfterLoad(() => {
|
||||
initSearch();
|
||||
}, ".*");
|
||||
export function init() {
|
||||
core.runAfterLoad(() => {
|
||||
initSearch();
|
||||
}, ".*");
|
||||
}
|
||||
|
||||
function initSearch() {
|
||||
let entry = document.createElement('li');
|
||||
|
@ -58,7 +63,7 @@ function handleQuickSearch(event) {
|
|||
}
|
||||
|
||||
function handleSearchForShiftF(event) {
|
||||
if (isShiftPressed) {
|
||||
if (helper.isShiftPressed) {
|
||||
if (event.key === 'F') {
|
||||
event.preventDefault();
|
||||
document.getElementById(quickSearchID).focus();
|
21
src/javascript/index.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
import regeneratorRuntime from "regenerator-runtime";
|
||||
|
||||
// core
|
||||
import { initCore } from './utils/aniwatchCore';
|
||||
// helper
|
||||
import { initHelpers } from './utils/helpers';
|
||||
// enhancements
|
||||
import { init as animeRequests } from './enhancements/animeRequests';
|
||||
import { init as lists } from './enhancements/lists';
|
||||
import { init as quickSearch } from './enhancements/quickSearch';
|
||||
|
||||
// core
|
||||
initCore();
|
||||
|
||||
//helper
|
||||
initHelpers();
|
||||
|
||||
// enhancements
|
||||
animeRequests();
|
||||
lists();
|
||||
quickSearch();
|
|
@ -1,11 +1,31 @@
|
|||
import * as helper from './helpers';
|
||||
|
||||
let __scripts = [];
|
||||
let __afterLoadScripts = [];
|
||||
|
||||
function registerScript(func, pattern = '.*') {
|
||||
export function initCore() {
|
||||
let observer = new MutationObserver(mutations => {
|
||||
mutations.forEach(mutation => {
|
||||
for (let i = 0; i < mutation.addedNodes.length; i++) {
|
||||
runScripts(mutation.addedNodes[i]);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
observer.observe(document.documentElement || document.body, {
|
||||
childList: true,
|
||||
subtree: true,
|
||||
attributes: true
|
||||
});
|
||||
|
||||
helper.onReady(() => awaitPageLoaded());
|
||||
}
|
||||
|
||||
export function registerScript(func, pattern = '.*') {
|
||||
__scripts.push({ "function": func, "pattern": pattern });
|
||||
}
|
||||
|
||||
function runScripts(node) {
|
||||
export function runScripts(node) {
|
||||
__scripts.forEach(script => {
|
||||
if (window.location.pathname.match(script.pattern)) {
|
||||
script.function(node);
|
||||
|
@ -13,25 +33,11 @@ function runScripts(node) {
|
|||
});
|
||||
}
|
||||
|
||||
let observer = new MutationObserver(mutations => {
|
||||
mutations.forEach(mutation => {
|
||||
for (let i = 0; i < mutation.addedNodes.length; i++) {
|
||||
runScripts(mutation.addedNodes[i]);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
observer.observe(document.documentElement || document.body, {
|
||||
childList: true,
|
||||
subtree: true,
|
||||
attributes: true
|
||||
});
|
||||
|
||||
function findPreloader() {
|
||||
return document.getElementById('preloader');
|
||||
}
|
||||
|
||||
function runAfterLoad(func, pattern = '.*') {
|
||||
export function runAfterLoad(func, pattern = '.*') {
|
||||
let preloader = findPreloader();
|
||||
if (typeof preloader !== undefined && preloader.style.display !== "none") {
|
||||
__afterLoadScripts.push({ "function": func, "pattern": pattern });
|
||||
|
@ -40,8 +46,6 @@ function runAfterLoad(func, pattern = '.*') {
|
|||
}
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", event => awaitPageLoaded(), false);
|
||||
|
||||
function awaitPageLoaded() {
|
||||
let preLoader = findPreloader();
|
||||
|
1
src/javascript/utils/colors.js
Normal file
|
@ -0,0 +1 @@
|
|||
export const aniBlue = '#348fff';
|
35
src/javascript/utils/helpers.js
Normal file
|
@ -0,0 +1,35 @@
|
|||
export var isShiftPressed = false;
|
||||
export var isCtrlPressed = false;
|
||||
|
||||
export function isHtmlElement(object) {
|
||||
return object instanceof HTMLElement;
|
||||
}
|
||||
|
||||
export function initHelpers() {
|
||||
document.addEventListener('keydown', event => handleKeyDown(event));
|
||||
document.addEventListener('keyup', event => handleKeyUp(event));
|
||||
}
|
||||
|
||||
export function onReady(fn) {
|
||||
if (document.readyState != 'loading') {
|
||||
fn();
|
||||
} else {
|
||||
document.addEventListener('DOMContentLoaded', fn);
|
||||
}
|
||||
}
|
||||
|
||||
function handleKeyDown(event) {
|
||||
handleKeyToggle(event, true);
|
||||
}
|
||||
|
||||
function handleKeyUp(event) {
|
||||
handleKeyToggle(event, false);
|
||||
}
|
||||
|
||||
function handleKeyToggle(event, isPressed) {
|
||||
if (event.key === 'Shift') {
|
||||
isShiftPressed = isPressed;
|
||||
} else if (event.key === 'Control') {
|
||||
isCtrlPressed = isPressed;
|
||||
}
|
||||
}
|
23
src/manifests/chrome.manifest.json
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"name": "$name",
|
||||
"short_name": "$shortName",
|
||||
"version": "$version",
|
||||
"version_name": "$semanticVersion",
|
||||
"description": "$description",
|
||||
"manifest_version": 2,
|
||||
"author": "$author",
|
||||
"homepage_url": "$homepageURL",
|
||||
"icons": {
|
||||
"48": "images/icon/icon_48.png",
|
||||
"96": "images/icon/icon_96.png"
|
||||
},
|
||||
"content_scripts": [{
|
||||
"matches": [
|
||||
"*://aniwatch.me/*"
|
||||
],
|
||||
"js": [
|
||||
"javascript/app.min.js"
|
||||
],
|
||||
"run_at": "document_end"
|
||||
}]
|
||||
}
|
23
src/manifests/firefox.manifest.json
Normal file
|
@ -0,0 +1,23 @@
|
|||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
{
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
"name": "$name",
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
"short_name": "$shortName",
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
"version": "$version",
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
"description": "$description",
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
"manifest_version": 2,
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
"author": "$author",
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
"developer": $developer,
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
"homepage_url": "$homepageURL",
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
"icons": {
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
"48": "images/icon/icon_48.png",
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
"96": "images/icon/icon_96.png"
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
},
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
"content_scripts": [{
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
"matches": [
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
"*://aniwatch.me/*"
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
],
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
"js": [
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
"javascript/app.min.js"
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
],
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
"run_at": "document_end"
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
}]
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
||||
}
|
||||
This needs to be an object for firefox, see devDocs/manifest.json/developer otherwise it's an invalid extension. This needs to be an object for firefox, see [devDocs/manifest.json/developer](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/developer) otherwise it's an invalid extension.
Yeah you are correct. Somehow forgot to change this but I read it, too. Yeah you are correct. Somehow forgot to change this but I read it, too.
This is fixed. Manifest validation on the webstores also is working now (regarding manifest.json syntax). I will open new issues for other validation problems I noticed. This is fixed. Manifest validation on the webstores also is working now (regarding *manifest.json* syntax). I will open new issues for other validation problems I noticed.
|
27
src/manifests/manifest.template.json
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"name": "Aniwatch Plus",
|
||||
"short_name": "AW+",
|
||||
"version": "0.1.0.0",
|
||||
"version_name": "0.1 Beta",
|
||||
"description": "Aniwatch Plus is an unofficial extension which provides several UI improvments for https://aniwatch.me.",
|
||||
"manifest_version": 2,
|
||||
"author": "Serraniel",
|
||||
"developer": {
|
||||
"name": "Serraniel",
|
||||
"url": "https://github.com/Serraniel"
|
||||
},
|
||||
"homepage_url": "https://github.com/Serraniel/AniwatchPlus",
|
||||
"icons": {
|
||||
"48": "images/icon/icon_48.png",
|
||||
"96": "images/icon/icon_96.png"
|
||||
},
|
||||
"content_scripts": [{
|
||||
"matches": [
|
||||
"*://aniwatch.me/*"
|
||||
],
|
||||
"js": [
|
||||
"javascript/app.min.js"
|
||||
],
|
||||
"run_at": "document_end"
|
||||
}]
|
||||
}
|
24
src/manifests/opera.manifest.json
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"name": "$name",
|
||||
"short_name": "$shortName",
|
||||
"version": "$version",
|
||||
"version_name": "$semanticVersion",
|
||||
"description": "$description",
|
||||
"manifest_version": 2,
|
||||
"author": "$author",
|
||||
"developer": $developer,
|
||||
"homepage_url": "$homepageURL",
|
||||
"icons": {
|
||||
"48": "images/icon/icon_48.png",
|
||||
"96": "images/icon/icon_96.png"
|
||||
},
|
||||
"content_scripts": [{
|
||||
"matches": [
|
||||
"*://aniwatch.me/*"
|
||||
],
|
||||
"js": [
|
||||
"javascript/app.min.js"
|
||||
],
|
||||
"run_at": "document_end"
|
||||
}]
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
const aniBlue = '#348fff';
|
|
@ -1,25 +0,0 @@
|
|||
var isShiftPressed = false;
|
||||
var isCtrlPressed = false;
|
||||
|
||||
function isHtmlElement(object) {
|
||||
return object instanceof HTMLElement;
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', event => handleKeyDown(event));
|
||||
document.addEventListener('keyup', event => handleKeyUp(event));
|
||||
|
||||
function handleKeyDown(event) {
|
||||
handleKeyToggle(event, true);
|
||||
}
|
||||
|
||||
function handleKeyUp(event) {
|
||||
handleKeyToggle(event, false);
|
||||
}
|
||||
|
||||
function handleKeyToggle(event, isPressed) {
|
||||
if (event.key === 'Shift') {
|
||||
isShiftPressed = isPressed;
|
||||
} else if (event.key === 'Control') {
|
||||
isCtrlPressed = isPressed;
|
||||
}
|
||||
}
|
Maybe would be nice if you could try to get the scripts from readme.md running with little docs I wrote @kaffem .