Post Reply 
Automatically zooming in DeviantArt images
Oct. 15, 2006, 01:45 AM
Post: #6
RE: Automatically zooming in DeviantArt images
SimplerHTML Wrote:The filter looks pretty complicated,
It could be 4 separate filters and some of it is more complicated than necessary.Wink
Code:
"(fullview":{"width":$AV(\\1),"height":$AV(\\2),"src":$AV((\#\\\)+\#)})\\0"
"$SET(pic=\\@)$SET(W=\\1)$SET(H=\\2)"
This part captures the dimensions and the URL. The "\"s are removed from the URL by using the stack, "(\#\\)+\#)". The values are written to 'pre-request' variables so they can be used when the filter matches later:
Code:
"<img id="zoomed-out-image" src=$AV(*)*/>"
"$SET(\\0=<img id="zoomed-out-image" src="$GET(pic)" width="$GET(W)" height="$GET(H)" />)"
(In code above and below, the $AV(*) isn't necessary. It's a habit of mine. In both cases, * would work. If the code below wasn't an immediate refresh, * might allow the filter to match too much, however.)
Code:
"<a href=$AV(*) class="continue">Click here to continue to deviantART[/url]"
"$SET(\\0=<meta http-equiv="refresh" content="0;url=\u">)"
Match the 'continue' code and replace it with an immediate refresh.

Code:
"(<div class="stream-ads">)\\0"
Because http://www.castlecops.com/t169193-FYI_deviantart.html

Code:
Replace = "\\0"
One filter looks nice. So each part will write its contribution to the 'positional' variable \0 and may need to use $SET(\0=stuff in here) to do it.

HTH
Add Thank You Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Automatically zooming in DeviantArt images - JJoe - Oct. 15, 2006 01:45 AM

Forum Jump: