Skip to content
Advertisement

Can’t figure why this code don’t edit the ‘href’ attributes in FB pages

I wonder why this code don’t edit the facebook href attributes.

I’m pretty sure it should works.

I get error in console Error: Promised response from onMessage listener went out of scope

The code:

JavaScript

Advertisement

Answer

I think you have one semi-colon that is causing a problem.

JavaScript

I ran the following at facebook.com (in the dev console) and it worked:

JavaScript

Since this code runs, it probably means that the problem is related to your regex.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement