Sleazy Fork is available in English.

Xhamster - Modify Video Related Links (Compatible OLD and BETA design) - v.03

Modify Related Links: split the "?from=video_related" at the end on them to have a clean bookmarkable link

Från och med 2017-10-19. Se den senaste versionen.

// ==UserScript== 
// @name          Xhamster - Modify Video Related Links (Compatible OLD and BETA design) - v.03
// @date          2017.10
// @version       0.3

// @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);
        });
    }
    removeAllContentTypesFromLinks();
}(jQuery));