Merhaba, Yabancı!

Burada yeni gibi görünüyorsunuz. Eğer katılmak istiyorsanız düğmelerden birine tıklayınız.

Modifying external script in Opera, Chrome

kategorisi Geliştirme [?]

I want to ask how to modify external script content before it's executed.
In Firefox document.onbeforescriptexecute works reliably (triggered), but not so in other browsers. Can anybody advice me what construct to use that does the job in virtually any browser...
Furthermore what is the proper event for @run-at clause?

Yorumlar

  • August 21 düzenlendi [?]

    There's no universal solution for Chrome. Some are listed on stackoverflow.com. Sometimes you can rewrite the html of the current page (example) so that it removes the original external script and replaces it with a modified script like <script>modified code here</script>.

  • August 21 düzenlendi [?]

    Then is there a universal code to eliminate specific calls in external script?
    I need to opt out adblock detection popup located in external script, provided the call is known. The script inclusion is made from root document:
    ...<script src="https://www.site.com/assets/js/app-dist.js"></script>
    You mean to replace the src attribute by modified content into .textContent?

Yorum yapmak içinOturum Açın yada Kayıt Olun .