Taringa V6

Permite volver a Taringa V6

当前为 2019-01-10 提交的版本,查看 最新版本

// ==UserScript==
// @name        Taringa V6
// @namespace   https://greasyfork.org/es/users/205385-xarkox
// @description Permite volver a Taringa V6
// @compatible  firefox
// @compatible  chrome
// @compatible  opera
// @match       *://*.taringa.net/*
// @version     1.1
// @license     GPLv3
// @grant       none
// @require     https://code.jquery.com/jquery-3.3.1.min.js
// @require     https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js
// ==/UserScript==

this.$ = this.jQuery = jQuery.noConflict(true);
var url_host = window.location.hostname;

function v6_links_fix(){
  $("a[href*='www.taringa.net']").attr("href", function(i, url){
    return url.replace("www.taringa.net", "classic.taringa.net");
  });
}

function taringa_v6(){
  if(url_host === "www.taringa.net"){
    window.location.replace('https://classic.taringa.net/');
  }
  else if(url_host === "classic.taringa.net"){
    v6_links_fix();
  }
}

$(function() {
  taringa_v6();
});