Skip to content

Commit

Permalink
Update v0.4.7 - Fixed printing issues and button 2 not working, also …
Browse files Browse the repository at this point in the history
…will not add recomendations to the preview
  • Loading branch information
isanchop committed Dec 6, 2022
1 parent 8c60b57 commit 82e7527
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
6 changes: 3 additions & 3 deletions doc-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ window.addEventListener('load', function(){
console.log(err);
}
try{
prev_buttons[2].parentNode.parentNode.prepend(button2);
prev_buttons[3].parentNode.parentNode.removeChild(prev_buttons[3].parentNode);
prev_buttons[5].parentNode.parentNode.prepend(button2);
prev_buttons[5].parentNode.parentNode.removeChild(prev_buttons[5].parentNode);
}catch(err){
console.log(err);
}
Expand All @@ -40,7 +40,7 @@ window.addEventListener('load', function(){
newWindow.document.getElementsByTagName("head")[0].innerHTML = head + "<style> .nofilter{filter: none !important;} </style>" + "<style> @media print {@page {size: A5;}}</style>";
newWindow.document.title = tit;
newWindow.document.getElementsByTagName("body")[0].innerHTML = pdf;
newWindow.document.getElementsByTagName("body")[0].childNodes[0].style = "";
newWindow.document.getElementsByTagName("body")[0].childNodes[0].style = "transform: scale(1); width: 100%; height: 100%;";

}

Expand Down
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.4.6",
"version": "0.4.7",
"description": "Banner remover, filter pass & document downloader",
"icons": {
"16": "img/icon16.png",
Expand Down
9 changes: 9 additions & 0 deletions remove-banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,14 @@ window.addEventListener('load', function(){
}
}
}

try{
var recomendations = document.getElementById('viewer-recommendations');
if(recomendations != null){
recomendations.parentNode.parentNode.removeChild(recomendations.parentNode);
}
}catch(err){
console.log(err);
}

});

0 comments on commit 82e7527

Please sign in to comment.