Skip to content

Instantly share code, notes, and snippets.

@unt0uchable
Last active December 17, 2021 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save unt0uchable/e487f0c58f89de0d6d7a21e1a93889d7 to your computer and use it in GitHub Desktop.
Save unt0uchable/e487f0c58f89de0d6d7a21e1a93889d7 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name xhamster_display_download_resolutions
// @author unt0uchable
// @downloadURL https://gist.github.com/unt0uchable/e487f0c58f89de0d6d7a21e1a93889d7/raw/0aac154ac97a1cded5d42d841c9ba01dc66e0cf6/xhamster_display_download_resolutions.user.js
// @updateURL https://gist.github.com/unt0uchable/e487f0c58f89de0d6d7a21e1a93889d7/raw/0aac154ac97a1cded5d42d841c9ba01dc66e0cf6/xhamster_display_download_resolutions.user.js
// @include http*://xhamster.com/movie/*
// @grant GM_addStyle
// @grant GM_xmlhttpRequest
// @grant GM_getResourceURL
// @grant GM_getValue
// @grant GM_setValue
// ==/UserScript==
function eventFire(el, etype){
if (el.fireEvent) {
el.fireEvent('on' + etype);
} else {
var evObj = document.createEvent('Events');
evObj.initEvent(etype, true, false);
el.dispatchEvent(evObj);
}
}
eventFire(document.getElementById('#btnLoad'), 'click');
console.log('#btnLoad clicked.');
// $( document ).ready(function() {
// $("#btnLoad").trigger("click");
// console.log('#btnLoad clicked.');
// });
// GM_addStyle ( " \
// #reportPopup { \
// display: none; \
// } \
// #loadPopup { \
// left: 177.5px; \
// top: 780.9px; \
// display: table; \
// } \
// " );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment