Skip to content

Instantly share code, notes, and snippets.

@mxbi
Created July 14, 2016 07:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mxbi/639979c0b8fbf6152fe2bb50c769816e to your computer and use it in GitHub Desktop.
Save mxbi/639979c0b8fbf6152fe2bb50c769816e to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Kaggle Profile Replacer
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Redirects
// @author http://github.com/mxbi
// @match https://tampermonkey.net/index.php?version=4.0.69&ext=dhdg&updated=true
// @grant none
// @include https://www.kaggle.com/*
// ==/UserScript==
(function() {
'use strict';
var isProfile = document.getElementsByClassName('profile');
var newProfile = window.location.href;
if (isProfile.length > 0 && newProfile.indexOf("old") == -1) {
var oldProfile = newProfile.split("/");
oldProfile.splice(3, 0, "old");
oldProfile = oldProfile.join('/');
window.location.replace(oldProfile);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment