IMDB ※ Clean Links (Enables History/Visited State)

Clean IMDB links so that any visited page is registered in your browser's history.

目前為 2019-03-22 提交的版本,檢視 最新版本

// ==UserScript==
// @name         IMDB ※ Clean Links (Enables History/Visited State)
// @namespace    http://tampermonkey.net/
// @version      0.12
// @description  Clean IMDB links so that any visited page is registered in your browser's history.
// @author       Oscar Kameoka — kitsuneDEV — www.kitsune.work
// @include      https://*.imdb.com/*
// @include      http://*.imdb.com/*
// @grant        none
// @require      https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// ==/UserScript==

(function() {
    'use strict';
    //
    // CLEAN EACH LINK
    //
    $(document).ready(function() {
        $('a').each(function (){
            if($(this).attr('href')){
                var linkURL = $(this).attr('href').split('?');
                // IF LINK IS NOT DIRECT APPEND HTTPS://WWW.IMDB.COM | IE: '/title/..'
                if(linkURL.indexOf('imdb.com') !== -1){
                   $(this).attr('href', linkURL[0]);
                }
                else {
                    $(this).attr('href', 'https://www.imdb.com'+linkURL[0]);
                }
           }
        });
    });
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址