您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Modify Related Links: split the "?from=video_related" at the end on them to have a clean bookmarkable link
当前为
// ==UserScript== // @name Xhamster - Modify Video Related Links (Compatible OLD and BETA design) // @date 2017.10 // @version 0.35 // @description Modify Related Links: split the "?from=video_related" at the end on them to have a clean bookmarkable link // @namespace https://greasyfork.org/users/7434 // @author janvier57 // @include *xhamster.com/movies/* // @include *xhamster.com/videos/* // FROM http://stackoverflow.com/questions/5119114/jquery-to-modify-a-link // @grant none // ==/UserScript== // $("<parentSelector>").on("click", ".box", function(event) { //do some fancy stuff here }) // OLD design (function($) { function removeAllContentTypesFromLinks() { var $a = $('.mixed-list .item.video .thumb-container'); $a.each(function() { var $this = $(this), href = $(this).attr('data-href').split('?from=video_related')[0]; $this.attr('href', href); }); } removeAllContentTypesFromLinks(); }(jQuery)); // $("<parentSelector>").on("click", ".box", function(event) { //do some fancy stuff here }) // BETA design (function($) { function removeAllContentTypesFromLinksBeta() { var $a = $('.video-thumb__image-container.thumb-image-container'); $a.each(function() { var $this = $(this), href = $(this).attr('href').split('?from=video_related')[0]; $this.attr('href', href); }); } removeAllContentTypesFromLinksBeta(); }(jQuery));