#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 => { import * as core from '../utils/aniwatchCore';
import * as helper from '../utils/helpers';
export function init() {
core.registerScript(node => {
// run the scripts // run the scripts
if (isHtmlElement(node)) { if (helper.isHtmlElement(node)) {
updateLanguageDisplay(node) updateLanguageDisplay(node)
} }
}, "^/anime/[0-9]*$"); }, "^/anime/[0-9]*$");
}
function updateLanguageDisplay(node) { function updateLanguageDisplay(node) {
const langPrefix = 'ep.lang.'; const langPrefix = 'ep.lang.';

View file

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