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

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

Μάθετε περισσότερα

Can't execute javascript via URL Bar

  • 2 απαντήσεις
  • 7 έχουν αυτό το πρόβλημα
  • 7 προβολές
  • Τελευταία απάντηση από cor-el

more options

https://support.mozilla.com/en-US/questions/871548 I suffer from this, the solution to use a bookmark works however I want to know how and what changes prevent the use of the URL Bar for such things.

Sometimes Firefox will respond to it being pasted in the URL Bar and sometimes it won't. there does not seem to be any logic behind it hence my question.

Edit: and just for the sake of it, not really important but how do you make mailto links always open in a new tab?

https://support.mozilla.com/en-US/questions/871548 I suffer from this, the solution to use a bookmark works however I want to know how and what changes prevent the use of the URL Bar for such things. Sometimes Firefox will respond to it being pasted in the URL Bar and sometimes it won't. there does not seem to be any logic behind it hence my question. Edit: and just for the sake of it, not really important but how do you make mailto links always open in a new tab?

Τροποποιήθηκε στις από το χρήστη Franpa

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

Javascript runs with different levels of acces rights. When you type something in the URLbar, it get no access rights (Null principal - starting in Firefox 6 see question 876916), so you can do almost nothing. A bookmarklet runs with page access rights, so it can do more like alert("hello") etc. Javascript that runs inside an add-on has maximum power and can do everything "chrome privileges".

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

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

more options

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

Javascript runs with different levels of acces rights. When you type something in the URLbar, it get no access rights (Null principal - starting in Firefox 6 see question 876916), so you can do almost nothing. A bookmarklet runs with page access rights, so it can do more like alert("hello") etc. Javascript that runs inside an add-on has maximum power and can do everything "chrome privileges".

more options

You can use the Scratch pad (Firefox > Web Developer > Scratchpad; Shift+F4) to run JavaScript code (Ctrl+R).