Changeset 29981
- Timestamp:
- 02/12/09 23:47:01 (4 years ago)
- Files:
-
- 1 modified
-
lang/javascript/userscripts/ldrprefav.user.js (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/userscripts/ldrprefav.user.js
r26150 r29981 25 25 const filters = { 26 26 "FeedBurner - Extinguish burning feeds" : function(f) { 27 var re = /<a(?: [^>]+?)? href="[ \t\r\n]*http:\/\/[^\/]+\/~\w\/[^>]+>[\s\S]+?<\/a>|<img(?: [^>]+?)? src="[ \t\r\n]*http:\/\/[^\/]+\/~\w\/[^>]+>(?:<\/img>)?/g;28 if (! /^http:\/\/feed(?:s \.feedburner\.(?:com|jp)|proxy\.google\.com)\//.test(f.channel.feedlink) &&27 var re = /<a(?: [^>]+?)? href="http:\/\/(?:[^\/]+\/~[a-z0-9]|feedads\.googleadservices\.com)\/[^>]+>[\s\S]+?<\/a>|<img(?: [^>]+?)? src="http:\/\/(?:[^\/]+\/~[a-z0-9]|feedads\.googleadservices\.com)\/[^>]+>(?:<\/img>)?/g; 28 if (! /^http:\/\/feed(?:s2?\.feedburner\.(?:com|jp)|proxy\.google\.com)\//.test(f.channel.feedlink) && 29 29 ! (f.items[0] && 30 30 (/^http:\/\/[^\/]+\/~r\/[^~]+?\/~\d\//.test(f.items[0].link) || 31 31 re.test(f.items[0].body)))) return; 32 32 33 filter(f.items, function(i) { return i.body.replace(/[^?]+/g, "").length < i.body.length / 10 });33 filter(f.items, function(i) i.body.replace(/[^?]+/g, "").length < i.body.length / 10); 34 34 foreach(f.items, function(i) { 35 35 i.body = i.body.replace(re, ""); … … 45 45 if (! (item && /^http:\/\/[^\/]+\/click\.phdo\?/.test(item.link))) return; 46 46 47 filter(f.items, function(i) { return i.title.indexOf("AD: ") != 0 });47 filter(f.items, function(i) i.title.indexOf("AD: ") != 0); 48 48 var re = /<img(?: [^>]+?)? src="[ \t\r\n]*http:\/\/www\.pheedo\.jp\/(?:img\.phdo|feeds\/tracker\.php)\?[^>]+>(?:<\/img>)?/g; 49 49 foreach(f.items, function(i) { … … 56 56 }, 57 57 "RSS Ads - Remove Trend Match, solve Feed Metrix" : function(f) { 58 //filter(f.items, function(i) { return i.author != "rssad.jp" });59 filter(f.items, function(i) { return i.title.indexOf("PR: ") != 0 });60 var re = /<a(?: [^>]+?)? href="[ \t\r\n]*http:\/\/rss\.rssad\.jp\/[^>]+>[\s\S]+?<\/a>|<img(?: [^>]+?)? src="[ \t\r\n]*http:\/\/rss\.rssad\.jp\/[^>]+>(?:<\/img>)? /g;58 //filter(f.items, function(i) i.author != "rssad.jp"); 59 filter(f.items, function(i) i.title.indexOf("PR: ") != 0); 60 var re = /<a(?: [^>]+?)? href="[ \t\r\n]*http:\/\/rss\.rssad\.jp\/[^>]+>[\s\S]+?<\/a>|<img(?: [^>]+?)? src="[ \t\r\n]*http:\/\/rss\.rssad\.jp\/[^>]+>(?:<\/img>)?|<a(?: [^>]+?)? href="[^"]+?\/ck\.php\?[^>]+><img(?: [^>]+?)? src="[^"]+?\/avw\.php\?[^>]+>(?:<\/img>)?/g; 61 61 foreach(f.items, function(i) { 62 62 i.body = i.body.replace(re, ""); … … 93 93 if (! /^http:\/\/[^.]+\.seesaa\.net\//.test(f.channel.link)) return; 94 94 95 filter(f.items, function(i) { return i.link.indexOf("http://match.seesaa.jp/") != 0 });95 filter(f.items, function(i) i.link.indexOf("http://match.seesaa.jp/") != 0); 96 96 }, 97 97 "Userscripts.org - Trim spam" : function(f) { 98 98 if (f.channel.link.indexOf("//userscripts.org/") < 0) return; 99 99 100 filter(f.items, function(i) { return i.title.toLowerCase().indexOf("scrap") < 0 });100 filter(f.items, function(i) i.title.toLowerCase().indexOf("scrap") < 0); 101 101 }, 102 102 "National Geographic News - Enlarge photos" : function(f) { … … 134 134 }, 135 135 "livedoor Blog - Enlarge thumbnails" : function(f) { 136 if (//! f.items.some(function(i) { return i.body.indexOf('"http://image.blog.livedoor.jp/') > -1 }) &&136 if (//! f.items.some(function(i) i.body.indexOf('"http://image.blog.livedoor.jp/') > -1) && 137 137 ! /^http:\/\/(?:blog|[^.]+)\.livedoor\.(?:jp|biz)\//.test(f.channel.link)) return; 138 138 … … 239 239 foreach(f.items, function(i) { 240 240 if (i.link.indexOf("/photos/cns!") < 0) { 241 i.link = i.link.replace(re1, function(m) { return m.toLowerCase() });241 i.link = i.link.replace(re1, function(m) m.toLowerCase()); 242 242 i.body = i.body.replace(re2, ""); 243 243 } else … … 431 431 } 432 432 433 function isFiltered(n) { return filteredIDs.indexOf(parseInt(n)) > -1 };434 function isPreFiltered(n) { return preFilteredIDs.indexOf(parseInt(n)) > -1 };433 function isFiltered(n) filteredIDs.indexOf(parseInt(n)) > -1; 434 function isPreFiltered(n) preFilteredIDs.indexOf(parseInt(n)) > -1;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)