您需要先安装一个扩展,例如 篡改猴、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 NEW DESIGN 2017 - Modify Video Related Links // @date 2017.09 // @version 0.2 // @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 }) (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 }) (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));