Skip to content

Commit

Permalink
+Hebrew
Browse files Browse the repository at this point in the history
  • Loading branch information
hemiola314 authored Nov 12, 2022
1 parent 158f2ea commit 8fa0717
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions expand-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,6 @@ class LogWindow extends BaseWindow {
class Root {
constructor() {
this.rootNode = document.body;
this.usingBody = true;
}

static removeOverlay() {
Expand Down Expand Up @@ -450,19 +449,13 @@ class Root {
if (topOnly) {
Global.log(EXPANDING + "Topmost post");
this.rootNode = divv.parentNode;
this.usingBody = false;
return true;
}
}

if (!this.usingBody) {
return true;
}

const USE_PARENT = true;

let check = [];
check.push([FS_ARTICLE, "Full browser", !USE_PARENT]);
check.push([ROLE_MAIN, "Main content area", !USE_PARENT]);
check.push([FS_ARTICLE, "Full browser"]);
check.push([ROLE_MAIN, "Main content area"]);

check.find(item => {
const divs = Dom.filterHidden(document.querySelectorAll(item[0]));
Expand All @@ -474,12 +467,7 @@ class Root {

if (!!div) {
Global.log(EXPANDING + item[1]);
if (item[2] == USE_PARENT) {
div = div.parentNode;
}

this.rootNode = div;
this.usingBody = false;
return true;
}
});
Expand Down Expand Up @@ -636,7 +624,8 @@ class Dom {
/%20weergeven$/, // Dutch (nl_NL)
/%20bekijken$/, // Dutch (nl_BE)
/^Bekijk%20/, // Dutch (nl_BE)
/^Δείτε%20/ // Greek
/^Δείτε%20/, // Greek
/^הצג%20/ // Hebrew
];

return words.some(re => { return s.match(re) != null; });
Expand All @@ -651,7 +640,8 @@ class Dom {
"Все комментарии".toLowerCase(), // Russian
"Όλα τα σχόλια".toLowerCase(), // Greek
"すべてのコメント", // Japanese
"Tutti i commenti".toLowerCase() // Italian
"Tutti i commenti".toLowerCase(), // Italian
"כל התגובות".toLowerCase() // Hebrew
];

return phrases.indexOf(s.trim().toLowerCase()) >= 0;
Expand Down

0 comments on commit 8fa0717

Please sign in to comment.