-
Notifications
You must be signed in to change notification settings - Fork 0
/
instamax.js
49 lines (37 loc) · 1.48 KB
/
instamax.js
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
40
41
42
43
44
45
46
// ==UserScript==
// @name InstaMax
// @namespace instagram.com
// @version 0.1
// @description Hmm
// @author SonGokussj4
// @match https://www.instagram.com/*
// @grant none
// ==/UserScript==
// @updateURL https://XXraw.githubusercontent.com/SonGokussj4/GitHub-userscripts/master/gist.js
// @downloadURL https://XXraw.githubusercontent.com/SonGokussj4/GitHub-userscripts/master/gist.js
// @supportURL https://XXgithub.com/SonGokussj4/GitHub-userscripts/issues
// @require http://code.jquery.com/jquery-3.4.1.min.js
// @icon http://img.csfd.cz/assets/b1733/images/apple_touch_icon.png
// @include *csfd.cz/uzivatel/*
(function () {
'use strict';
setTimeout(() => {
var elems = getImageElements();
console.log("Hmm", elems);
for (const element of elems) {
var tag = document.createElement("a");
tag.href = element.querySelector("a[href^='/p']").href + 'media?size=l';
var text = document.createTextNode("MAX");
tag.appendChild(text);
element.prepend(tag);
}
}, 1000);
// var links = document.querySelectorAll("a[href^='/p/']");
// var links = document.getElementsByClassName("KL4Bh");
function getImageElements() {
// var links = document.getElementsByClassName("KL4Bh"); // image
var links = document.getElementsByClassName("kIKUG");
// console.log("links", links);
return links;
}
})();