Skip to content

Commit

Permalink
Update v0.5.1 - Fix: Catching errors on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
isanchop committed Feb 27, 2023
1 parent 6ec7890 commit 63ecea0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,

"name": "StuHack",
"version": "0.5.0",
"version": "0.5.1",
"description": "Banner remover, filter pass & document downloader",
"icons": {
"16": "img/icon16.png",
Expand Down
6 changes: 4 additions & 2 deletions remove-banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ window.addEventListener('load', function(){
banners[0].parentNode.removeChild(banners[0]);
}
}
var premiumButton = document.getElementById('header-position-handle').childNodes[0].childNodes[1].childNodes[0].childNodes[1];
premiumButton.parentNode.removeChild(premiumButton);
var premiumButton = document.getElementById('header-position-handle')?.childNodes[0]?.childNodes[1]?.childNodes[0]?.childNodes[1];
if(premiumButton != null){
premiumButton.parentNode.removeChild(premiumButton);
}

/* Mobile */
if (window.innerWidth <= 990){
Expand Down
30 changes: 17 additions & 13 deletions version-check.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 63ecea0

Please sign in to comment.