How to disable / block / suppress a specific JavaScript (without disabling JS)
There's a specific script on a site I would like to disable without stopping the other scripts from working. I am using Firefox with Adblock Plus and Greasemonkey. I already googled extensively and tried different approaches but ultimately failed to succeed. Seems like I don't have enough understanding when it comes to setting up userscripts or defining adblock rules.
This is the script I need to block. It's an annoying popunder. The content gets blocked by Adblock but an unwanted empty window still opens everytime I click on the page.
<script>
BetterJsPop.add('https://www.url.tld/page.html',
{
under: true,
newTab: false,
perpage: 5,
cookieExpires: 600,
});
</script>
Any help would be appreciated.
javascript blocking
migrated from webapps.stackexchange.com Oct 8 '16 at 0:48
This question came from our site for power users of web applications.
add a comment |
There's a specific script on a site I would like to disable without stopping the other scripts from working. I am using Firefox with Adblock Plus and Greasemonkey. I already googled extensively and tried different approaches but ultimately failed to succeed. Seems like I don't have enough understanding when it comes to setting up userscripts or defining adblock rules.
This is the script I need to block. It's an annoying popunder. The content gets blocked by Adblock but an unwanted empty window still opens everytime I click on the page.
<script>
BetterJsPop.add('https://www.url.tld/page.html',
{
under: true,
newTab: false,
perpage: 5,
cookieExpires: 600,
});
</script>
Any help would be appreciated.
javascript blocking
migrated from webapps.stackexchange.com Oct 8 '16 at 0:48
This question came from our site for power users of web applications.
A link to the page would be helpful. Is it something like this ? (popunder opens when clicking on the page)
– lemonsqueeze
Oct 8 '16 at 5:40
add a comment |
There's a specific script on a site I would like to disable without stopping the other scripts from working. I am using Firefox with Adblock Plus and Greasemonkey. I already googled extensively and tried different approaches but ultimately failed to succeed. Seems like I don't have enough understanding when it comes to setting up userscripts or defining adblock rules.
This is the script I need to block. It's an annoying popunder. The content gets blocked by Adblock but an unwanted empty window still opens everytime I click on the page.
<script>
BetterJsPop.add('https://www.url.tld/page.html',
{
under: true,
newTab: false,
perpage: 5,
cookieExpires: 600,
});
</script>
Any help would be appreciated.
javascript blocking
There's a specific script on a site I would like to disable without stopping the other scripts from working. I am using Firefox with Adblock Plus and Greasemonkey. I already googled extensively and tried different approaches but ultimately failed to succeed. Seems like I don't have enough understanding when it comes to setting up userscripts or defining adblock rules.
This is the script I need to block. It's an annoying popunder. The content gets blocked by Adblock but an unwanted empty window still opens everytime I click on the page.
<script>
BetterJsPop.add('https://www.url.tld/page.html',
{
under: true,
newTab: false,
perpage: 5,
cookieExpires: 600,
});
</script>
Any help would be appreciated.
javascript blocking
javascript blocking
asked Oct 7 '16 at 9:45
domib_dedomib_de
612
612
migrated from webapps.stackexchange.com Oct 8 '16 at 0:48
This question came from our site for power users of web applications.
migrated from webapps.stackexchange.com Oct 8 '16 at 0:48
This question came from our site for power users of web applications.
A link to the page would be helpful. Is it something like this ? (popunder opens when clicking on the page)
– lemonsqueeze
Oct 8 '16 at 5:40
add a comment |
A link to the page would be helpful. Is it something like this ? (popunder opens when clicking on the page)
– lemonsqueeze
Oct 8 '16 at 5:40
A link to the page would be helpful. Is it something like this ? (popunder opens when clicking on the page)
– lemonsqueeze
Oct 8 '16 at 5:40
A link to the page would be helpful. Is it something like this ? (popunder opens when clicking on the page)
– lemonsqueeze
Oct 8 '16 at 5:40
add a comment |
3 Answers
3
active
oldest
votes
Try uBlock Origin instead of AdBlockPlus maybe ?
It has specific code to block popups / popunders.
add a comment |
I'm really a beginner in understanding and debugging of HTML.
And I was experiencing this problem to and I've tried several options but nothing worked. like a filter option in ABP that blocks the URL of the popup that was created by the script. (before i knew about where it specifically came from/was generated by)
So i went digging in the HTML source code and found exactly what you described. A java popunder script. and this piece of code was right above it:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "http://www.your-specific-website.com/",
"potentialAction": {
"@type": "SearchAction",
"target": "http://www.popup-you-want-to-disable.com/search/?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}
</script>
<script src="http://www.your-specific-website.com/js/script.js"></script>
<script src="http://www.your-specific-website.com/js/license.4.js"></script>
this let me know that the pupunder was generated by a script what was located in *js/script.js (because of this line <script src="http://www.your-specific-website.com/js/script.js"></script>
)
so i had to create a custom filter to prevent this script from being read.
so i added this custom ABP filter
|http://www.your-specific-website.com/js/script.js
and until now it seems to work exactly like i hoped (so it only blocks the annoying pupunder and not more than i want. cause there were other java applications or scripts running on the website)
I have tried to reproduce that the website does open the popop/popunder but it hasn't done yet. So until i do get it again, with the filter enabled, i consider this fix working.
Goodluck to you, and i hope this gets it fixed for you.
(Again, I'm only a hobbyist who likes to find out what causes the errors/unwanted actions i come across.
So if someone with more knowledge about the html code or this specific problem reads this and thinks this is definitely not a solution for this problem, please say so, and, show me what i have to do for this problem to be solved.)
add a comment |
I think you can call BetterJsPop.reset();
using the console or bookmarklet ( bookmark where the URL is javascript:BetterJsPop.reset();void(0)
) depending on the version of BetterJsPop.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1132655%2fhow-to-disable-block-suppress-a-specific-javascript-without-disabling-js%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try uBlock Origin instead of AdBlockPlus maybe ?
It has specific code to block popups / popunders.
add a comment |
Try uBlock Origin instead of AdBlockPlus maybe ?
It has specific code to block popups / popunders.
add a comment |
Try uBlock Origin instead of AdBlockPlus maybe ?
It has specific code to block popups / popunders.
Try uBlock Origin instead of AdBlockPlus maybe ?
It has specific code to block popups / popunders.
answered Oct 8 '16 at 5:33
lemonsqueezelemonsqueeze
1,0181818
1,0181818
add a comment |
add a comment |
I'm really a beginner in understanding and debugging of HTML.
And I was experiencing this problem to and I've tried several options but nothing worked. like a filter option in ABP that blocks the URL of the popup that was created by the script. (before i knew about where it specifically came from/was generated by)
So i went digging in the HTML source code and found exactly what you described. A java popunder script. and this piece of code was right above it:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "http://www.your-specific-website.com/",
"potentialAction": {
"@type": "SearchAction",
"target": "http://www.popup-you-want-to-disable.com/search/?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}
</script>
<script src="http://www.your-specific-website.com/js/script.js"></script>
<script src="http://www.your-specific-website.com/js/license.4.js"></script>
this let me know that the pupunder was generated by a script what was located in *js/script.js (because of this line <script src="http://www.your-specific-website.com/js/script.js"></script>
)
so i had to create a custom filter to prevent this script from being read.
so i added this custom ABP filter
|http://www.your-specific-website.com/js/script.js
and until now it seems to work exactly like i hoped (so it only blocks the annoying pupunder and not more than i want. cause there were other java applications or scripts running on the website)
I have tried to reproduce that the website does open the popop/popunder but it hasn't done yet. So until i do get it again, with the filter enabled, i consider this fix working.
Goodluck to you, and i hope this gets it fixed for you.
(Again, I'm only a hobbyist who likes to find out what causes the errors/unwanted actions i come across.
So if someone with more knowledge about the html code or this specific problem reads this and thinks this is definitely not a solution for this problem, please say so, and, show me what i have to do for this problem to be solved.)
add a comment |
I'm really a beginner in understanding and debugging of HTML.
And I was experiencing this problem to and I've tried several options but nothing worked. like a filter option in ABP that blocks the URL of the popup that was created by the script. (before i knew about where it specifically came from/was generated by)
So i went digging in the HTML source code and found exactly what you described. A java popunder script. and this piece of code was right above it:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "http://www.your-specific-website.com/",
"potentialAction": {
"@type": "SearchAction",
"target": "http://www.popup-you-want-to-disable.com/search/?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}
</script>
<script src="http://www.your-specific-website.com/js/script.js"></script>
<script src="http://www.your-specific-website.com/js/license.4.js"></script>
this let me know that the pupunder was generated by a script what was located in *js/script.js (because of this line <script src="http://www.your-specific-website.com/js/script.js"></script>
)
so i had to create a custom filter to prevent this script from being read.
so i added this custom ABP filter
|http://www.your-specific-website.com/js/script.js
and until now it seems to work exactly like i hoped (so it only blocks the annoying pupunder and not more than i want. cause there were other java applications or scripts running on the website)
I have tried to reproduce that the website does open the popop/popunder but it hasn't done yet. So until i do get it again, with the filter enabled, i consider this fix working.
Goodluck to you, and i hope this gets it fixed for you.
(Again, I'm only a hobbyist who likes to find out what causes the errors/unwanted actions i come across.
So if someone with more knowledge about the html code or this specific problem reads this and thinks this is definitely not a solution for this problem, please say so, and, show me what i have to do for this problem to be solved.)
add a comment |
I'm really a beginner in understanding and debugging of HTML.
And I was experiencing this problem to and I've tried several options but nothing worked. like a filter option in ABP that blocks the URL of the popup that was created by the script. (before i knew about where it specifically came from/was generated by)
So i went digging in the HTML source code and found exactly what you described. A java popunder script. and this piece of code was right above it:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "http://www.your-specific-website.com/",
"potentialAction": {
"@type": "SearchAction",
"target": "http://www.popup-you-want-to-disable.com/search/?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}
</script>
<script src="http://www.your-specific-website.com/js/script.js"></script>
<script src="http://www.your-specific-website.com/js/license.4.js"></script>
this let me know that the pupunder was generated by a script what was located in *js/script.js (because of this line <script src="http://www.your-specific-website.com/js/script.js"></script>
)
so i had to create a custom filter to prevent this script from being read.
so i added this custom ABP filter
|http://www.your-specific-website.com/js/script.js
and until now it seems to work exactly like i hoped (so it only blocks the annoying pupunder and not more than i want. cause there were other java applications or scripts running on the website)
I have tried to reproduce that the website does open the popop/popunder but it hasn't done yet. So until i do get it again, with the filter enabled, i consider this fix working.
Goodluck to you, and i hope this gets it fixed for you.
(Again, I'm only a hobbyist who likes to find out what causes the errors/unwanted actions i come across.
So if someone with more knowledge about the html code or this specific problem reads this and thinks this is definitely not a solution for this problem, please say so, and, show me what i have to do for this problem to be solved.)
I'm really a beginner in understanding and debugging of HTML.
And I was experiencing this problem to and I've tried several options but nothing worked. like a filter option in ABP that blocks the URL of the popup that was created by the script. (before i knew about where it specifically came from/was generated by)
So i went digging in the HTML source code and found exactly what you described. A java popunder script. and this piece of code was right above it:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "http://www.your-specific-website.com/",
"potentialAction": {
"@type": "SearchAction",
"target": "http://www.popup-you-want-to-disable.com/search/?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}
</script>
<script src="http://www.your-specific-website.com/js/script.js"></script>
<script src="http://www.your-specific-website.com/js/license.4.js"></script>
this let me know that the pupunder was generated by a script what was located in *js/script.js (because of this line <script src="http://www.your-specific-website.com/js/script.js"></script>
)
so i had to create a custom filter to prevent this script from being read.
so i added this custom ABP filter
|http://www.your-specific-website.com/js/script.js
and until now it seems to work exactly like i hoped (so it only blocks the annoying pupunder and not more than i want. cause there were other java applications or scripts running on the website)
I have tried to reproduce that the website does open the popop/popunder but it hasn't done yet. So until i do get it again, with the filter enabled, i consider this fix working.
Goodluck to you, and i hope this gets it fixed for you.
(Again, I'm only a hobbyist who likes to find out what causes the errors/unwanted actions i come across.
So if someone with more knowledge about the html code or this specific problem reads this and thinks this is definitely not a solution for this problem, please say so, and, show me what i have to do for this problem to be solved.)
answered Jan 5 '17 at 22:33
Lukas BLukas B
1
1
add a comment |
add a comment |
I think you can call BetterJsPop.reset();
using the console or bookmarklet ( bookmark where the URL is javascript:BetterJsPop.reset();void(0)
) depending on the version of BetterJsPop.
add a comment |
I think you can call BetterJsPop.reset();
using the console or bookmarklet ( bookmark where the URL is javascript:BetterJsPop.reset();void(0)
) depending on the version of BetterJsPop.
add a comment |
I think you can call BetterJsPop.reset();
using the console or bookmarklet ( bookmark where the URL is javascript:BetterJsPop.reset();void(0)
) depending on the version of BetterJsPop.
I think you can call BetterJsPop.reset();
using the console or bookmarklet ( bookmark where the URL is javascript:BetterJsPop.reset();void(0)
) depending on the version of BetterJsPop.
answered Feb 9 at 22:12
LiveLongAndProsperLiveLongAndProsper
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1132655%2fhow-to-disable-block-suppress-a-specific-javascript-without-disabling-js%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
A link to the page would be helpful. Is it something like this ? (popunder opens when clicking on the page)
– lemonsqueeze
Oct 8 '16 at 5:40