您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Replaces all the links to view the cast of an IMDB title with the mobile version of the site because the mobile version has better formatting, but redirect back to desktop for the media gallery because that one is better
- // ==UserScript==
- // @name Redirect IMDB Cast links to Mobile
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description Replaces all the links to view the cast of an IMDB title with the mobile version of the site because the mobile version has better formatting, but redirect back to desktop for the media gallery because that one is better
- // @author You
- // @match https://www.imdb.com/*
- // @match https://m.imdb.com/*
- // @icon https://www.google.com/s2/favicons?sz=64&domain=imdb.com
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- var links = document.querySelectorAll('a[href*="fullcredits/cast"]');
- links.forEach(function(thing) {thing.href = thing.href.replace("www","m")});
- links = document.querySelectorAll('a[href*="mediaindex"]');
- links.forEach(function(thing) {thing.href = thing.href.replace("//m.","//www.")});
- })();