Closed Vikuuu closed 3 weeks ago
Hi,
Since JS is alien to me, I just copy-pasted the code from the official repository, and the script just worked. Now comparing your code with the official one, I can see that you've made a few changes:
Your code:
var images = document.querySelectorAll(
'img[src$=".jpg"], img[src$=".jpeg"], img[src$=".png"]'
);
Official code:
images = document.querySelectorAll('img[src$=".jpg"], img[src$=".jpeg"], img[src$=".png"]');
You can see the difference? There are some more in your code. You can copy-paste the official script and see if it solves the issue.
Keep track of combination of double and single quotes. Since the js is gonna be embedded into your HTML inside of an anchor tag, there cannot be double of quote types. If it the case, they will interrupt the string accidentally.
As I click on Bookmark it this error shows up
and then it is not working as intended and i don't know what to do.
This is the
bookmarklet.js
code:Please help.