a wish . . .

in
Subscribe to a wish . . . 4 posts, 2 voices



avro User
FirefoxWindows

I just love this GM script!! You the MAN!!! It just keeps on getting better. THANK YOU!

There's not really anything I can do to help (unless you incorporate a paypal donate button some where, and I can promise you a dinner and a movie) but maybe I can at least make suggestions to new ideas. I have an idea that would make this great script something just AWESOME!

I wish Image Inliner had a UI that when a user comes across a picture host not supported, the user can access the UI and create the required xpath script himself and save it as an additional pattern for the new image host.

Please take a look at a FFx extension AutoPager (https://addons.mozilla.org/en-US/firefox/addon/.... This extension will load the next page inline as you scroll to the end of the page, so you don't have to keep clicking the next button. The nice thing about this extension is that if you come across a website you visit often that's not supported, you can create your own autopager pattern for that website using the autopager UI (with a little trial and error).

Wouldn't it just be SUPER AWESOME if the users could teach Image Inliner new patterns on their own.

 
marrr Script's Author
MozillaX11

Hi avro, I like your enthusiasm. :)
But there are some issues with that idea.

Image Inliner uses regular expressions to look up the image-URLs. It wouldn't be hard to add XPath as an alternative, but it would increase the complexity, while not adding much benefit. Applying XPath would require parsing the HTML into the DOM, which would be a big performance hit, at least compared to efficient regular expressions. (Still, the current regexps could get some optimisation.)

Some hosts require quite a complex approach, which either way requires some additional thought and they may get even more complex (e.g. javascript encryption). That could be hard to handle in a UI. I'm afraid, creating a nice UI like in AutoPager (which is an AddOn) where you can build the XPath, is requires much work, especially in a greasemonkey script.

I think it would be a better idea, when interested people would just post the required few lines of code here in the board for inclusion in the main line. That way, everyone would benefit from the work needed to create a new host entry:


addImageHoster({
"type": "redirector",
"prefix": "imagebanana.com",
"match": "^http://(?:[\\w\\d]+\\.)?imagebanana\\.com/view/",
"pattern": "/view/",
"replacement": "/img/"
});

Maybe there should be a manual for this, but the existing dozens of imagehosts should show a pattern. :)

 
avro User
FirefoxWindows

Hi Marrr, I looked at the image inliner script and I see the one paragraph I would have to add to create a pattern for a new image hosting site, but I couldn't figure out how . You have the different patterns but trying to make a working pattern is beyond my scripting capabilities. The only think I can think of to do is leave it to the professional (you). So when I find more image hosting sites, I'll add it as a request here.

I really do want to help in your efforts, so make a paypal donation button and I will paypal you some $$$$ your way.

 
marrr Script's Author
MozillaX11

I understand the current undocumented structure can be quite confusing. So I wrote some documentation for posterity. It'll be included in the next version and I have pasted it here, in case you're still interested:

http://nopaste.php-q.net/260714

You could try to play with above mentioned regex-tester and some existing image host.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel