Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function ()
- {
- var href = "";
- switch (true)
- {
- case / 2ch - c\.net / .test(location.href):
- href = $("table.tablesorter a#pickup").attr("href").extractUrl();
- break;
- case / 2ch\.logpo\.jp / .test(location.href):
- location.href = $("div#headline h2 a").attr("href");
- break;
- case / 2ch - matome\.net / .test(location.href):
- $("li.entry_title a").each(function (i)
- {
- if ($(this).attr("style") == "color:red;") {
- href = $(this).attr("href");
- return false;
- }
- });
- break;
- case / newser\.cc / .test(location.href):
- $("td.news-link a").each(function (i)
- {
- if ($(this).attr("style") == "background:#fff8dc; color:#F00;") {
- href = $(this).attr("href");
- return false;
- }
- });
- break;
- case / matomeantena\.com\/feed/.test(location.href):
- case / nullpoantenna\.com\/feed/.test(location.href):
- href = $("div#rss_entry_list li.rss_link a").attr("href").extractUrl();
- break;
- case / news - choice\.net / .test(location.href):
- href = $("div.pickuptitle a").attr("href");
- break;
- case / katuru\.com\/rss/.test(location.href):
- href = $("h1.rss_center_div a").attr("href");
- break;
- case / 2ch\.shakin\.in / .test(location.href):
- href = $("li.ID0 a").attr("href");
- break;
- case / matomeja\.jp\/feed/.test(location.href):
- href = $("td.entry a.active").attr("href");
- break;
- case / anything - navi\.net / .test(location.href):
- href = $("table#SortTable a strong").closest("a").attr("href");
- break;
- case / . + \.doorblog\.jp / .test(location.href):
- case / . + \.livedoor\.jp / .test(location.href):
- switch (true)
- {
- case / matometatta / .test(location.href):
- href = $("div#main div.title a").attr("href");
- break
- }
- if (href.isValidUrl()) {
- break
- }
- if ($("a.title_link").length) {
- href = $("a.title_link").attr("href")
- }
- else if ($(".title_link a").length) {
- href = $(".title_link a").attr("href")
- }
- else if ($("div.select a").length) {
- href = $("div.select a").attr("href")
- }
- else if ($("div.selected a").length) {
- href = $("div.selected a").attr("href")
- }
- break;
- case / . + \.fc2.com / .test(location.href):
- if ($("div.selected a").length) {
- href = $("div.selected a").attr("href")
- }
- else if ($("div.pickup_title a").length) {
- href = $("div.pickup_title a").attr("href")
- }
- break
- }
- try {
- ret = href.isValidUrl()
- }
- catch (e) {
- ret = false
- }
- if (ret) {
- location.href = "http://mato-me.net/detail/" + href;
- }
- });
- String.prototype.extractUrl = function ()
- {
- return this.match(/http:\/\/.+$/).toString();
- };
- String.prototype.isValidUrl = function ()
- {
- if (/^http:\/\/.+$/.test(this)) {
- return true
- }
- else {
- return false;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement