לאתר זה תהיה פונקציונליות מוגבלת בזמן שאנו מתחזקים אותו לשיפור החוויה שלך. אם מאמר מסויים לא פותר את הבעיה שלך וברצונך לשאול שאלה, קהילת התמיכה שלנו מחכה לעזור לך ב־Twitter תחת ‎@FirefoxSupport וב־Reddit תחת ‎/r/firefox.

חיפוש בתמיכה

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

מידע נוסף

javascript bookmarklets broken with FF8

  • 3 תגובות
  • 5 have this problem
  • 1 view
  • תגובה אחרונה מאת cor-el

more options

I have a couple of JavaScript bookmarklets that were working fine with FF7 and are now broken with FF8. Nothing was changed within the code. I execute the script with the "Custom Buttons" extension. The script prompts me for a numeric string and then append that string to a predefined URL. Here is a sample of the "Known Good" script.

loadURI ("javascript:(function(){Tkt=document.getSelection();if(!Tkt){void(Tkt=prompt('Ticket #',))}if(Tkt){z=open().document;z.location.href='https://my.domain.com/ticket/'+escape(Tkt)}})()");

Any ideas are greatly appreciated. I am pretty confident that this is NOT a problem with the script as it has been working fine for months prior to the recent update to FF8.

I have a couple of JavaScript bookmarklets that were working fine with FF7 and are now broken with FF8. Nothing was changed within the code. I execute the script with the "Custom Buttons" extension. The script prompts me for a numeric string and then append that string to a predefined URL. Here is a sample of the "Known Good" script. loadURI ("javascript:(function(){Tkt=document.getSelection();if(!Tkt){void(Tkt=prompt('Ticket #',''))}if(Tkt){z=open().document;z.location.href='https://my.domain.com/ticket/'+escape(Tkt)}})()"); Any ideas are greatly appreciated. I am pretty confident that this is NOT a problem with the script as it has been working fine for months prior to the recent update to FF8.

פתרון נבחר

You're welcome

Read this answer in context 👍 0

כל התגובות (3)

more options

The getSelection() function is no no longer a String, but an object.

Try to force a string type with Tkt=document.getSelection()+ or document.getSelection().toString()

more options

THANK YOU!!!! This is resolved.

more options

פתרון נבחר

You're welcome