Xhamster - No related Video links (Remove their "#mlrelated" part in address bar) v.0.36

Remove "#mlrelated" part in address bar (when you open a related video from the Video page)

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name            Xhamster - No related Video links (Remove their "#mlrelated" part in address bar) v.0.36
// @version 0.36
// @description	    Remove "#mlrelated" part in address bar (when you open a related video from the Video page)
//
// @namespace https://greasyfork.org/users/7434
// @author janvier57

// @include https://*xhamster.com/movies/*
// @include https://xhamster.com/videos/*

// @include      https://*.xhamster.com/movies/*
// @include      https://*.xhamster.com/videos/*

// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @autor Phlegomatic  / janvier56
// FROM:  https://greasyfork.org/forum/discussion/comment/54300/#Comment_54300
// @grant none
// @run-at document-start

// ==/UserScript==

var Check = "#mlrelated"; // what you removed
var currentLocation = window.location.href; // get current URL

if(currentLocation.includes(Check)){ // check if contains
var URL = currentLocation.replace(Check, ""); // replace
window.location = URL; // goto adjusted URL
}