![]() |
|
filter to strip presentation tags - Printable Version +- The Un-Official Proxomitron Forum (https://www.prxbx.com/forums) +-- Forum: Forum Related (/forumdisplay.php?fid=37) +--- Forum: Proxomitron Program (/forumdisplay.php?fid=4) +--- Thread: filter to strip presentation tags (/showthread.php?tid=50) Pages: 1 2 |
- jardokraka - Apr. 01, 2004 06:30 PM Hello: could anyone please help me solve this task. this is what is needed: 1) see if the URL matches a list of URLs in, say, restyle.txt; 2) if yes, strip all presentation markup; 3) display page according the stylesheet in, say, restyle.css nothing fancy there. i'd just like to see certain pages in a better format. something like verdana / tahoma, in black, against some light-creme or gray background. i'm sure some people have this covered in their setups. thanks in advance. marc - ProxRocks - Apr. 01, 2004 07:43 PM Not sure how 'effective' that would be... For one, the "names" of the CSS-based line-items would need to be identical for every page in your .txt list of sites... Below is a small portion of a .css style sheet open in another window at this very moment... Code: .fHL {font-size:12pt; font-family:Arial}Sure, you can replace "their" style sheet with one of your own, but you need to keep all of the "names" the same for them to be 'applied' to the page... I can insert that above .css into EVERY page that I visit, but if none of those pages "reference" fCC (number 6 in the above .css), then NOTHING will happen on the page that I inserted that .css into... Sure, there are "fixes"... I insert a .css into EVERY page that defines link formatting for visited links, .pdf links, .gif and .jpg links, javascript links, and mailto: links... And then I disable all .css style sheets... Or I use a "zap presentational html" bookmarklet that proves quite effective... - jardokraka - Apr. 01, 2004 07:51 PM i understand. but there're simpler cases. like, say, a given page is formated with font tags. i presume some filter might strip this inline formatting, and then reapply a user-defined stylesheet to the background, p, h1-h6, and links. am i wrong? - ProxRocks - Apr. 01, 2004 08:47 PM Sounds do-able, yes... I guess I'd have to see the actual .css (and web page) to really know for sure... Perhaps just insert your own .css into every page that defines links, p, h1-h6, and background as "!important;"... - sidki3003 - Apr. 01, 2004 09:08 PM What i'm doing is just blocking all original external stylesheets ... Code: [Patterns]I didn't need to remove the <style> blocks yet but that is probably easy: bounds=$NEST(<style,</style >) match=*. I wouldn't bother about the other smallish style tags and attributes, unless they actually disturb the page layout *after* applying my user CSS. sidki - jardokraka - Apr. 01, 2004 10:28 PM sidki, i just checked out quickly your config, and well, yes, the stylesheet substitution feature is what i needed. now , i have been using JD's advanced config for ages, and i'm not ready / willing (as of yet) to switch to a different config. if you could help incorporate the restyling feature into JD's advanced?i can't figure out exactly what rule to copy from your config. thanks so much in advance. - ProxRocks - Apr. 01, 2004 10:37 PM JD_Advanced already "inserts" a pre-defined .css script to every page... Just edit JD's "prox-links.css" to incorporate the .css inclusions you are attempting to implement... - jardokraka - Apr. 01, 2004 11:06 PM thing is, i want the changes to affect only the sites listed in restyle.txt - not _every_ page. - JD5000 - Apr. 01, 2004 11:19 PM You can add that filter to my set, just add it and create the new list. Look in the Proxo helps files on how to create a list. ![]() ~JD - jardokraka - Apr. 01, 2004 11:23 PM JD5000, what filter exactly are you referring to? the stylesheets must also go to some folder. which one? thanks. - JD5000 - Apr. 01, 2004 11:30 PM Based on sidki's, I would think... Code: [Patterns]Then the stylesheets would go in the html folder. <prox dir>/html/CustomCSS/Custom.css HTH ~JD - JD5000 - Apr. 01, 2004 11:35 PM Sidki, just reminded me. If they have more then one CSS file (Alternate displays), yours will be injected more then once. - jardokraka - Apr. 01, 2004 11:35 PM thanks, JD5000. in sidki's config it's handled in a rather cool way - i can assign a particular CSS to each given site: Code: # use a local stylesheet $SET(usercss=CSS_NAME)how could i achive the same effect with your config? thanks so much. - JD5000 - Apr. 01, 2004 11:37 PM Can't be done right now. In the new set, should be able to do it the same way.
- jardokraka - Apr. 02, 2004 12:10 AM ok, let's see what i did and where it went wrong. [ i am modifying JD_advanced config. ] 1) created a list named CustomCSS.txt, added this line there - Code: http://www.geocities.com/srl_list/and put it into <prox dir>/Lists/JD_Lists/Misc Lists/ so the path to the newly created list is - <prox dir>/Lists/JD_Lists/Misc Lists/CustomCSS.txt great. 2) added the list to proxomitron's lists through configure > block lists > add. the list is called "CustomCSS". 3) inserted the code supploed by JD5000 earlier in this thread Code: [Patterns]saved default config. reloaded proxomitron. cleared cache. went to http://www.geocities.com/srl_list/index.html - no changes. where did i go wrong? thanks so much. |