Skip to content

Commit

Permalink
if noColors, don't box <500 edits
Browse files Browse the repository at this point in the history
  • Loading branch information
NovemLinguae committed Jan 23, 2024
1 parent c1c2ec6 commit 3f0b7b1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions UserHighlighterSimple.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ class UserHighlighterSimple {

async execute() {
await this.getUsernames();
this.setHighlightColors();
if ( ! this.window.userHighlighterSimpleNoColors ) {
this.setHighlightColors();
}
let that = this;
this.$('#article a, #bodyContent a, #mw_contentholder a').each(function(index, element) {
that.$link = that.$(element);
Expand Down Expand Up @@ -299,11 +301,8 @@ class UserHighlighterSimple {
background-color: transparent !important;
background: unset !important;
`);
this.mw.util.addCSS(`.UHS-no-permissions { border: 1px solid black !important; }`);

if ( this.window.userHighlighterSimpleNoColors ) {
return;
}
this.mw.util.addCSS(`.UHS-no-permissions { border: 1px solid black !important; }`);

// TODO: grab the order from an array, so I can keep checkForPermission and addCSS in the same order easily, lowering the risk of the HTML title="" being one thing, and the color being another
this.addCSS('UHS-500edits-bot-trustedIP', `background-color: lightgray !important;`);
Expand Down

0 comments on commit 3f0b7b1

Please sign in to comment.