Αναζήτηση στην υποστήριξη

Προσοχή στις απάτες! Δεν θα σας ζητήσουμε ποτέ να καλέσετε ή να στείλετε μήνυμα σε κάποιον αριθμό τηλεφώνου ή να μοιραστείτε προσωπικά δεδομένα. Αναφέρετε τυχόν ύποπτη δραστηριότητα μέσω της επιλογής «Αναφορά κατάχρησης».

Learn More

All Bookmarklets work on Chrome but some don't on Firefox.

  • 1 απάντηση
  • 1 έχει αυτό το πρόβλημα
  • 23 προβολές
  • Τελευταία απάντηση από yayivah429

more options

I have a Bookmarklet that draws a red border on all elements in the web page.

` (function(){

   var e = document.querySelectorAll('*');
   var el = e.length;
   for (let i = 0; i < el; i++) {
           setTimeout(() => {
               e[i].style.border="1px solid red";
           }, 100);
   }

})(); `

This works fine on Chromium-based browser, but when I run this in Firefox it starts drawing borders and then all of the sudden a number gets written on the page. Everything is gone and a number appears.

I don't know why this happens, every other Bookmarklet works fine. It might be the script I wrote but I doubt it because it works completely okay on Chrome.

Running this snippet directly inside the console works fine.

I have a Bookmarklet that draws a red border on all elements in the web page. ` (function(){ var e = document.querySelectorAll('*'); var el = e.length; for (let i = 0; i < el; i++) { setTimeout(() => { e[i].style.border="1px solid red"; }, 100); } })(); ` This works fine on Chromium-based browser, but when I run this in Firefox it starts drawing borders and then all of the sudden a number gets written on the page. Everything is gone and a number appears. I don't know why this happens, every other Bookmarklet works fine. It might be the script I wrote but I doubt it because it works completely okay on Chrome. Running this snippet directly inside the console works fine.
Συνημμένα στιγμιότυπα

Επιλεγμένη λύση

yayivah429 said

I have a Bookmarklet that draws a red border on all elements in the web page.
(function(){
    var e = document.querySelectorAll('*');
    var el = e.length;
    for (let i = 0; i < el; i++) {
            setTimeout(() => {
                e[i].style.border="1px solid red";
            }, 100);
    }
})();

This works fine on Chromium-based browser, but when I run this in Firefox it starts drawing borders and then all of the sudden a number gets written on the page. Everything is gone and a number appears.

I don't know why this happens, every other Bookmarklet works fine. It might be the script I wrote but I doubt it because it works completely okay on Chrome.

Running this snippet directly inside the console works fine.

Edit: I just cleared all the history & cache and now works fine.

Sorry for wasting your time.

Ανάγνωση απάντησης σε πλαίσιο 👍 0

Όλες οι απαντήσεις (1)

more options

Επιλεγμένη λύση

yayivah429 said

I have a Bookmarklet that draws a red border on all elements in the web page.
(function(){
    var e = document.querySelectorAll('*');
    var el = e.length;
    for (let i = 0; i < el; i++) {
            setTimeout(() => {
                e[i].style.border="1px solid red";
            }, 100);
    }
})();

This works fine on Chromium-based browser, but when I run this in Firefox it starts drawing borders and then all of the sudden a number gets written on the page. Everything is gone and a number appears.

I don't know why this happens, every other Bookmarklet works fine. It might be the script I wrote but I doubt it because it works completely okay on Chrome.

Running this snippet directly inside the console works fine.

Edit: I just cleared all the history & cache and now works fine.

Sorry for wasting your time.