Open codeKing2020 opened 2 years ago
@codeKing2020 can you paste the console log and attach the .js
file?
I seem to be having a similar problem, To me it appears that the bookmark_launcher javascript is being truncated.
I notice this truncation on every browser(chrome,edge,firefox) Find attached mugshots of respective browser behaviour. I shall comment the same on github too.
Solution: Trying on it,
I attempted to copy paste the bookmark_launcher unnamed function in to the console and I got a > ERR: BlOCKED BY CLIENT
Response.
Hello @savakarrohan so what I'm getting it that the javascript is being truncated (shortened) by the browser for you? Maybe it could be a proxy/firewall problem? Why not paste your code pertaining to bookmarkking (the HTML, and JS) in a pastebin and send the links.
I attempted to copy paste the bookmark_launcher unnamed function in to the console and I got a > ERR: BlOCKED BY CLIENT Response.
This error is commonly caused due to one of the extensions installed within Chrome. Most likely you will see this error appear if you are using an extension such as Adblock or a browser safety plugin. For example, Adblock or browser safety extensions use a set of parameters which defines what will be blocked.
Did you try disable all extensions? Why not try another site like amazon?
Personally, I was using Linux when I encountered my problem, and that might've been the issue, because my javascript was nnot being escaped, therefore the code came out wrong and couldn't be parsed. All my gratitude to @zenx who helped me on his discord channel!
@codeKing2020, I just tried the methods you mentioned above.
I disabled browser extensions and "reinstalled" the bookmark. "reboomarked" I also tried this on a fresh install of firefox which has no extensions. No change in the output.
I had mcaffee running and disabled the firewall for that. Still have no change in the output.
I tried all the methods above on amazon.in
I restarted my server a couple of times, and It appears that running the javascript from bookmarklet_launcher.js
works just fine now. so
ERR: BlOCKED BY CLIENT Response. this error is now solved.
So now my only doubt is why is the bookmark cutting off the javascript? notably the number of characters is 120
I'm sorry but I do not know how to solve this issue, maybe contact the team at discord?
@savakarrohan can you try the following encoded JavaScript for your bookmark?
javascript:(function()%7Bif(window.myBookmarklet!%3D%3Dundefined)%7BmyBookmarklet()%3B%7Delse%7Bdocument.body.appendChild(document.createElement(%27script%27)).src%3D%27https://127.0.0.1:8000/static/js/bookmarklet.js%3Fr%3D%27%2BMath.floor(Math.random()*99999999999999999999)%3B%7D%7D)()%3B
I suspect you have mentioned to the browser that there is some javascript javascript
and everything is in utf8
encoding?
@savakarrohan it looks like there is an issue with URL encoding with the bookmarklet. The previous code is the bookmarklet_launcher.js JS code with URL encoding applied. I wasn't able to replicate this issue. I tested the bookmarklet with/without URL encoding and it worked well in both cases for Chrome and Safari.
@zenx The bookmark I created is loading the html
template but in that it is not showing any images which are present on the web page, it is totally blank (Screenshot 1).
Not all sites give the same result in some are showing error in console
(Screenshot 2)
Any help regarding this??
Hi @zenx , I'm trying to use the bookmarklet bookmark in firefox on amazon to get pictures, but the container does not even load. When I checked the console for issues, it said that the bookmarkLaunch() function is not working. This is maybe because the two js files are not 'connected' well, but I do not know how to solve that. I already tried changing the urls to include 'https://" instead of just '//127...' but that did not work. What should I do?