Created
May 10, 2023 15:50
-
-
Save realies/511e85bf07123c9e3cb69b522a75119d to your computer and use it in GitHub Desktop.
tamper monkey script to register as a uk student with any email
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name smsng-uk-student-any-mail | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @match https://shop.samsung.com/uk/multistore/ukepp/uk_student/registration | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=samsung.com | |
// @grant GM_addStyle | |
// @run-at document-start | |
// ==/UserScript== | |
var _open = XMLHttpRequest.prototype.open; | |
window.XMLHttpRequest.prototype.open = function(method, URL) { | |
var _onreadystatechange = this.onreadystatechange, | |
_this = this; | |
_this.onreadystatechange = function() { | |
if ( | |
_this.readyState === 4 && | |
_this.status === 200 && | |
~URL.indexOf("registration?email=") | |
) { | |
try { | |
var data = _this.response; | |
data = true; | |
Object.defineProperty(_this, "response", { | |
value: data | |
}); | |
} catch (e) { | |
console.log("Error", method, URL, e); | |
} | |
console.log("Caught", method, URL, _this.response); | |
} | |
if (_onreadystatechange) _onreadystatechange.apply(this, arguments); | |
}; | |
Object.defineProperty(this, "onreadystatechange", { | |
get: function get() { | |
return _onreadystatechange; | |
}, | |
set: function set(value) { | |
_onreadystatechange = value; | |
} | |
}); | |
return _open.apply(_this, arguments); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment