• Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Rules
    • Help

    Do more on the web, with a fast and secure browser!

    Download Opera browser with:

    • built-in ad blocker
    • battery saver
    • free VPN
    Download Opera

    Script manager for Opera

    Opera for Mac
    2
    20
    6341
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • zalex108
      zalex108 last edited by

      Would this work?

      Have you tried it?

      "You cannot know the meaning of your life until you are connected to the power that created you". · Shri Mataji Nirmala Devi

      Reply Quote 0
        1 Reply Last reply
      • A Former User
        A Former User last edited by

        How would I know if it works by trying? Where would I try? I have lately seen very few sites that try to do those tricks. I still want to prevent them if they do try those things. Have I gotten the code right? The first code is probably correct, since it was in the script that I modified to add the rest, but what about the resize, close, popunder, and initbox?

        Reply Quote 0
          1 Reply Last reply
        • zalex108
          zalex108 last edited by

          I mean testing the UserScript in websites with those limitations / ads.

          If you need that options I suppose you visit sites with those problems and you try to find a way to fix them.

          Maybe streaming and torrent websites could be useful to test the UserScript.

          "You cannot know the meaning of your life until you are connected to the power that created you". · Shri Mataji Nirmala Devi

          Reply Quote 0
            1 Reply Last reply
          • A Former User
            A Former User last edited by

            I have not seen those problems with the sites I visit regularly, but sometimes I go to new sites, and I cannot predict beforehand what problems I will encounter.

            What use is visiting a torrent website? I do not use torrents. Do you know any streaming websites that I could use for testing? The only streaming sites that I know are YouTube, Yellowstone National Park streaming webcam, and some other webcams such as at www.opentopia.com.

            Reply Quote 0
              1 Reply Last reply
            • zalex108
              zalex108 last edited by

              I've tried to test in some of them but did not encountered that issues and I don't remember which sites uses that kind of restrictions / ads that I've seen time ago.

              Maybe another user may bring some light for check the script or testing sites.

              "You cannot know the meaning of your life until you are connected to the power that created you". · Shri Mataji Nirmala Devi

              Reply Quote 0
                1 Reply Last reply
              • A Former User
                A Former User last edited by

                I looked up some javascript examples, and I think that all but the first line of removals should have been "window." and not "document.".

                Reply Quote 0
                  1 Reply Last reply
                • zalex108
                  zalex108 last edited by

                  This is Reek's script for Enable right click on websites having disabled

                  // ==UserScript==
                  // @name Enable Right Click | Reek
                  // @namespace O8MMlsFZ4aoOdcjB
                  // @description Enable right click on websites having disabled
                  // @version 1.0
                  // @license Creative Commons BY-NC-SA
                  // @encoding utf-8
                  // @icon http://www.gravatar.com/avatar/afb8376a9f634cd3501af4387de6425f.png
                  // @include http*://*
                  // ==/UserScript==
                  
                  // Enable right click
                  unsafeWindow.document.oncontextmenu = null;
                  

                  "You cannot know the meaning of your life until you are connected to the power that created you". · Shri Mataji Nirmala Devi

                  Reply Quote 0
                    1 Reply Last reply
                  • zalex108
                    zalex108 last edited by

                    This is to block "Are you sure you want to leave this page" popup.

                    Not sure if it's what you want with "Closing windows".

                    // ==UserScript==
                    // @name            [ALL] Block Are You Sure You Want To Leave This Page
                    // @author
                    // @description     Block "Are you sure you want to leave this page" popup.
                    // @downloadURL
                    // @grant
                    // @homepageURL     https://bitbucket.org/INSMODSCUM/userscripts-scripts/src
                    // @icon
                    // @include         http*://*
                    // @namespace       insmodscum 
                    // @require
                    // @run-at          document-start
                    // @updateURL
                    // @version         1.0
                    // ==/UserScript==
                    
                    window.onbeforeunload = null;
                    

                    "You cannot know the meaning of your life until you are connected to the power that created you". · Shri Mataji Nirmala Devi

                    Reply Quote 0
                      1 Reply Last reply
                    • A Former User
                      A Former User last edited by

                      This is Reek's script for Enable right click on websites having disabled

                       // ==UserScript==
                          > // @name Enable Right Click | Reek
                          > // @namespace O8MMlsFZ4aoOdcjB
                          > // @description Enable right click on websites having disabled
                          > // @version 1.0
                          > // @license Creative Commons BY-NC-SA
                          > // @encoding utf-8
                          > // @icon http://www.gravatar.com/avatar/afb8376a9f634cd3501af4387de6425f.png
                          > // @include http*://*
                          > // ==/UserScript==
                          > // Enable right click 
                          > unsafeWindow.document.oncontextmenu = null;
                      

                      Why "unsafeWindow"? I do not like any monkeying with my context menu. The code I used was what I found in someone else's script. I simply extended it to add other removals. Why include only http or https? Why not also ftp? Do these scripts work on external javascripts as well as on web pages?

                      Reply Quote 0
                        1 Reply Last reply
                      • A Former User
                        A Former User last edited by

                        This is to block "Are you sure you want to leave this page" popup.
                        Not sure if it's what you want with "Closing windows".

                             // ==UserScript==
                        >     // @name            [ALL] Block Are You Sure You Want To Leave This Page
                        >     // @author
                        >     // @description     Block "Are you sure you want to leave this page" popup.
                        >     // @downloadURL
                        >     // @grant
                        >     // @homepageURL     https://bitbucket.org/INSMODSCUM/userscripts-scripts/src
                        >     // @icon
                        >     // @include         http*://*
                        >     // @namespace       insmodscum 
                        >     // @require
                        >     // @run-at          document-start
                        >     // @updateURL
                        >     // @version         1.0
                        >     // ==/UserScript==
                        >     window.onbeforeunload = null;
                        

                        Nuisance items such as popups, popunders, weird noises can also come from onunload or onbeforeunload. I want to stop all of those things. If I used "window.onunload = null;" that will work to prevent anything like that? What about the window events resizeTo, resizeBy, close, blur(), focus(), and open(popunder) used with "= null;"? Would that work as well? The commands onmouseover and onmouseout are document events, right? Would you use this:

                        "document.removeAttribute ("onmouseover");"

                        or would you use this:

                        "document.onmouseover = null;"?

                        Why does font appear in italics if I have to edit my post?

                        Reply Quote 0
                          1 Reply Last reply
                        • zalex108
                          zalex108 last edited by

                          You have to leave spaces or (enters) or put:

                          when finish a line, you could use "Preview" button to check the post before post it.

                          About scripting questions, I don't know since I'm not programmer and with those scripts and some others my browsing needs are covered.

                          There is an extension (maybe more) to re enable right click, you may check it and see which code uses.

                          "You cannot know the meaning of your life until you are connected to the power that created you". · Shri Mataji Nirmala Devi

                          Reply Quote 0
                            1 Reply Last reply
                          • A Former User
                            A Former User last edited by

                            I do not see any Opera extensions to re-enable right click. I found only scripts.

                            Reply Quote 0
                              1 Reply Last reply
                            • zalex108
                              zalex108 last edited by

                              Well, in Chrome Store I've seen it.

                              You will need Download Chrome Extension from Opera Addons.

                              "You cannot know the meaning of your life until you are connected to the power that created you". · Shri Mataji Nirmala Devi

                              Reply Quote 0
                                1 Reply Last reply
                              • A Former User
                                A Former User last edited by

                                That make three different formats that I have seen, and I am not sure which is best. I put two of them in, just in case.

                                Reply Quote 0
                                  1 Reply Last reply
                                • zalex108
                                  zalex108 last edited by

                                  I'm using a UserScript to block ads and today I had to block some inline video ads.

                                  As Opera Adblocker can not block Ads manually and Adguard seems a bit hard I've tested with the UserScript and worked fine, don't know if could work for you too.

                                  AdRemover - In GreasyFork there are some speed complains, didn't noticed, but despite that, seems that works fine.

                                  "You cannot know the meaning of your life until you are connected to the power that created you". · Shri Mataji Nirmala Devi

                                  Reply Quote 0
                                    1 Reply Last reply
                                  • A Former User
                                    A Former User last edited by

                                    For blocking ads, uBlock Origin is working for me.

                                    Reply Quote 0
                                      1 Reply Last reply
                                    • zalex108
                                      zalex108 last edited by admin

                                      Well, apart from ads I mean your post needing: https://forums.opera.com/post/117685

                                      "You cannot know the meaning of your life until you are connected to the power that created you". · Shri Mataji Nirmala Devi

                                      Reply Quote 0
                                        1 Reply Last reply
                                      • First post
                                        Last post

                                      Computer browsers

                                      • Opera for Windows
                                      • Opera for Mac
                                      • Opera for Linux
                                      • Opera beta version
                                      • Opera USB

                                      Mobile browsers

                                      • Opera for Android
                                      • Opera Mini
                                      • Opera Touch
                                      • Opera for basic phones

                                      • Add-ons
                                      • Opera account
                                      • Wallpapers
                                      • Opera Ads

                                      • Help & support
                                      • Opera blogs
                                      • Opera forums
                                      • Dev.Opera

                                      • Security
                                      • Privacy
                                      • Cookies Policy
                                      • EULA
                                      • Terms of Service

                                      • About Opera
                                      • Press info
                                      • Jobs
                                      • Investors
                                      • Become a partner
                                      • Contact us

                                      Follow Opera

                                      • Opera - Facebook
                                      • Opera - Twitter
                                      • Opera - YouTube
                                      • Opera - LinkedIn
                                      • Opera - Instagram

                                      © Opera Software 1995-