Every so often, I want to do something to a webpage. It might have a table that I want to extract every nth item or temporarily remove some items etc etc.
Usually, I go into the Chrome Dev Tools, and hack about in the console. However, what I would really like to do is to force amber into the page, and be able to do things with the Smalltalk environment. Unfortunately, I am close, but I must be doing something wrong - or it isn't possible.
What I have tried is:
scripttag = document.createElement('script');
document.getElementsByTagName('head')[0].appendChild(scripttag);
loadAmber();
This nearly works, but I get error messages where the browser is trying to load e.g. amber.css from the hostname rather than from the dropbox path. So, obviously, it doesn't find it.
What am I doing wrong? Or, is this a same origin problem, and I can't get around it?
By the way, the files don't have to be in Dropbox. I was using that as a quick hack.
Cheers
Andy