New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
premium banner not going away. do i need to renew the extension? #55
Comments
Studocu has indeed changed their banner code. Open the studocu chrome extension folder -> Open remove-banner.js -> remove all code -> add this code: window.addEventListener('load', function(){
var banner = document.querySelectorAll('._95f5f1767857')[0]
banner.remove()
if (window.innerWidth <= 990){
var pages = document.getElementById('page-container').childNodes;
if(pages != null){
for(i=0; i<pages.length; i++) {
if(pages[i].id == ''){
pages[i].parentNode.removeChild(pages[i]);
}
}
}
}
}); This will remove the banner for now. You can use this until the creator release a new update. |
@CLARC237 @imanol-af Next: open doc-viewer.js in the stuhack folder for(i=0; i<pages.length; i++){
pages[i].childNodes[0].style = "display: block;";
} Replace them with these: for(i=0; i<pages.length; i++){
var elm_id = pages[i].getAttribute('id')
if (elm_id != null && elm_id.includes('pf')) {
pages[i].childNodes[0].style = "display: block;";
}
} Let me know if it worked |
https://www.studeersnel.nl/nl/document/middelbare-school-nederland/nederlands/nn6-3vwo-antwoorden/20482762 |
The current version of the extension lets you download the files. Are you experiencing any problems with downloading? |
|
Did you add the code from this reply: It works fine on my end |
i did as best as i could. |
but if i split screen meaning that i drag the browser to the edge of my computer screen to make the screen in half it somehow works, but when i make to fill the screen it doesn't work |
Weird. I'm not familiar with Edge. Does this occur when you use Chrome? The code I have provided works for other users, so my guess it's something on your end. |
@KXTOD yes and edge is a chromium based browser |
Can you show the file |
Yes me a few minutes.
![image](https://github.com/isanchop/stuhack/assets/52102887/29e5ff5e-2611-44c2-b6f2-62311e46165b)
…________________________________________
From: KXTOD ***@***.***>
Sent: Thursday, January 11, 2024 7:15:11 PM
To: isanchop/stuhack
Cc: Nadine lynch; Author
Subject: Re: [isanchop/stuhack] premium banner not going away. do i need to renew the extension? (Issue #55)
Can you show the file remove-banner.js?
—
Reply to this email directly, view it on GitHub<#55 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AMNQNZ4YFAX6SKY47KLTCK3YOAMZ7AVCNFSM6AAAAABBIKUHNCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBXGYYDQMZQHA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
File seems good. Follow these steps:
var banner = document.querySelectorAll('._95f5f1767857')[0]
banner.remove() Does this remove the banner? |
where exactly is that? |
nvm i know |
You need to paste them in one after another. Like this var banner = document.querySelectorAll('._95f5f1767857')[0] Press ENTER banner.remove() |
Refresh the page and try again. I'm literally trying it on the document you are using and it works fine. Try using chrome and if that doesn't work I don't have a clue. |
i think i fixed it now! i made those codes in a js file and when i clicked on refresh on the extension, I tried it on a different document and it works |
@KXTOD thank you for the help, i enjoyed this troubleshooting session here, lol. oddly enough, i learnt something from you today lol thank you again. i am going to keep this thread open for others to use. |
No problem! Glad I could help and don't hesitate to ask any more questions. Cool to hear you learned something :) |
So I just tried the suggestions you gave Nadine and still can't get it to work. The URL I'm trying is: https://www.studocu.com/de/document/technische-universitat-munchen/adaptive-and-array-signal-processing/aasp-lecture-notes/23502408 Contents of:
} function addButtons(){
} var observer = new MutationObserver(function(mutations) { window.addEventListener('load', function(){
|
Sorry for the weird formatting. |
This code worked for me
|
i added that into remove-banner.js after it gets the document-wrapper id |
This worked perfectly; thank you very much! |
https://github.com/danieltyukov/studocuhack |
where exactly did you add the second code? ive managed to get the banner off the main page but not the preview |
i have been getting this:
do i need to update the version?
The text was updated successfully, but these errors were encountered: