#3 JS fixes after merge

This commit is contained in:
Serraniel 2020-09-20 17:44:43 +02:00
parent d58b651a8f
commit d14040ceb6
Signed by: Serraniel
GPG key ID: 3690B4E7364525D3
2 changed files with 13 additions and 6 deletions

View file

@ -1,9 +1,14 @@
registerScript(node => {
// run the scripts
if (isHtmlElement(node)) {
updateLanguageDisplay(node)
}
}, "^/anime/[0-9]*$");
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)) {
updateLanguageDisplay(node)
}
}, "^/anime/[0-9]*$");
}
function updateLanguageDisplay(node) {
const langPrefix = 'ep.lang.';

View file

@ -4,6 +4,7 @@ import { initCore } from './utils/aniwatchCore';
import { initHelpers } from './utils/helpers';
// enhancements
import { init as animeRequests } from './enhancements/animeRequests';
import { init as languageDisplay } from './enhancements/languageDisplay';
import { init as lists } from './enhancements/lists';
import { init as quickSearch } from './enhancements/quickSearch';
@ -15,5 +16,6 @@ initHelpers();
// enhancements
animeRequests();
languageDisplay();
lists();
quickSearch();