Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Commit 82e7527

Browse files
committed
Update v0.4.7 - Fixed printing issues and button 2 not working, also will not add recomendations to the preview
1 parent 8c60b57 commit 82e7527

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

doc-viewer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ window.addEventListener('load', function(){
1818
console.log(err);
1919
}
2020
try{
21-
prev_buttons[2].parentNode.parentNode.prepend(button2);
22-
prev_buttons[3].parentNode.parentNode.removeChild(prev_buttons[3].parentNode);
21+
prev_buttons[5].parentNode.parentNode.prepend(button2);
22+
prev_buttons[5].parentNode.parentNode.removeChild(prev_buttons[5].parentNode);
2323
}catch(err){
2424
console.log(err);
2525
}
@@ -40,7 +40,7 @@ window.addEventListener('load', function(){
4040
newWindow.document.getElementsByTagName("head")[0].innerHTML = head + "<style> .nofilter{filter: none !important;} </style>" + "<style> @media print {@page {size: A5;}}</style>";
4141
newWindow.document.title = tit;
4242
newWindow.document.getElementsByTagName("body")[0].innerHTML = pdf;
43-
newWindow.document.getElementsByTagName("body")[0].childNodes[0].style = "";
43+
newWindow.document.getElementsByTagName("body")[0].childNodes[0].style = "transform: scale(1); width: 100%; height: 100%;";
4444

4545
}
4646

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 3,
33

44
"name": "StuHack",
5-
"version": "0.4.6",
5+
"version": "0.4.7",
66
"description": "Banner remover, filter pass & document downloader",
77
"icons": {
88
"16": "img/icon16.png",

remove-banner.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,14 @@ window.addEventListener('load', function(){
2020
}
2121
}
2222
}
23+
24+
try{
25+
var recomendations = document.getElementById('viewer-recommendations');
26+
if(recomendations != null){
27+
recomendations.parentNode.parentNode.removeChild(recomendations.parentNode);
28+
}
29+
}catch(err){
30+
console.log(err);
31+
}
2332

2433
});

0 commit comments

Comments
 (0)