-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathNumerama_-_Change_layout.user.js
More file actions
39 lines (36 loc) · 1.01 KB
/
Numerama_-_Change_layout.user.js
File metadata and controls
39 lines (36 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// ==UserScript==
// @name Numerama - Change layout
// @author Tailszefox
// @namespace localhost
// @description Change layout on front page of Numerama because the button to do it doesn't work
// @icon https://i.imgur.com/V1mDH4l.png
// @match https://www.numerama.com/
// @version 1.0
// @grant none
// ==/UserScript==
window.setTimeout(function(){
var sortButton = document.querySelector(".sort-list-format");
var n = $(sortButton);
var i = n.getAjaxContainer();
var a = i.getConfigContainer(n, i);
var t = i.showLoader();
$.ajax(
{
type: 'GET',
url: "https://www.numerama.com/ajax.php",
data: a,
dataType: 'JSON',
success: function (a) {
t.endLoading(),
void 0 !== a.html && i.html(a.html),
i.data('ajax-id') && (a.container = i.data('ajax-id')),
NUM.ajaxContentTriggers(),
i.animate({
opacity: 1
}, 200, function () {
console.log("Done");
})
}
}
);
}, 5000);