Disable on Exit scripts

  • One of my pet hates while browsing is the pop up box that appears just as you are about to leave the page - perhaps because the cursor has left the window - usually asking you if you would like to subscribe to some newsletter. I'd love to disable these permanently. Likewise, the are you sure you want to exit dialog boxes when you try to close a page. And the overlay ads you have to close before you can read website content. I'd love to see a feature where it is possible to disable some of these new-style pop-ups.

  • Some of them are necessary - on web apps like Google Docs/Gmail they need to ask whether to save changes. That's why Opera Presto had to enable them for some sites. Other sites do tend to abuse them though ...

    If a site is displaying a popup before you close the tab, your suggestion would have no effect ... you did realize that, yes?

  • Can you post some links to such (kinda malicious) sites? It either can be possible that you have some malware present...

  • No - it's not malware. As an example on Morrisons supermarket site this morning https://groceries.morrisons.com/webshop/startWebshop.do , after looking at a product and moving the cursor out of the web page window there was a pop up that offers to save me money if I spend 80 pounds. It grabs your attention, which is good for them, but irritating for someone that doesn't want to be distracted.

    I take your point on the onexit scripts for saving docs, which makes it tricky to do away with altogether.

  • I couldn't duplicate such behavior, even after turning adblock off nothing did pop up. Any other example?

  • http://www.techradar.com/ is one of many sites that pops up the option to subscribe to an email when the cursor leaves the page frame. So the point is, you've read the page, you're all set to do something else - close the tab, go to another tab and bing! - before you go... result: irritation. For me, anyway!

  • I created a script for Violentmonkey to try to disable onunload and onbeforeunload commands in javascript to get rid of such behaviour. I have not noticed those annoyances since.

    // ==UserScript==
    // @name     Block Script Tricks
    // @namespace  Violentmonkey Scripts
    // @include  *
    // @grant       none
    // ==/UserScript==
    (function() {
        'use strict';
    window.removeAttribute ("onunload"); window.onunload = null;
    window.removeAttribute ("onbeforeunload"); window.onbeforeunload = null;
    })();
    
Log in to reply
 

Looks like your connection to Opera forums was lost, please wait while we try to reconnect.