Last active
June 4, 2024 17:26
Revisions
-
ImMALWARE revised this gist
Jun 4, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ function like(post_id, xftoken) { const r = new XMLHttpRequest(); r.open("POST", "https://lolz.live/posts/"+post_id+"/like?_xfNoRedirect=1&_xfToken="+xftoken+"&_xfResponseType=json"); r.send(); } -
ImMALWARE revised this gist
Jun 4, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ // ==UserScript== // @name Кнопка симпатии в розыгрышах // @version 1.1.1 // @description Прям как хотел огузок // @author MALWARE // @match https://zelenka.guru/forums/contests* -
ImMALWARE revised this gist
Jun 4, 2024 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,8 @@ // @description Прям как хотел огузок // @author MALWARE // @match https://zelenka.guru/forums/contests* // @match https://lolz.guru/forums/contests* // @match https://lolz.live/forums/contests* // @grant none // @icon https://zelenka.guru/favicon.ico // ==/UserScript== -
ImMALWARE renamed this gist
Jul 28, 2023 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
ImMALWARE revised this gist
Mar 8, 2023 . 1 changed file with 35 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ // ==UserScript== // @name Кнопка симпатии в розыгрышах // @version 1.1 // @description Прям как хотел огузок // @author MALWARE // @match https://zelenka.guru/forums/contests* @@ -16,16 +16,38 @@ function like(post_id, xftoken) { (function() { 'use strict'; const xftoken = document.querySelector('input[name="_xfToken"]').value; const discussionList = document.querySelector("div.discussionListItems"); const addLikeButton = function(discussionListItem) { const likeButtonElement = document.createElement("a"); likeButtonElement.className = "threadControl Tooltip OverlayTrigger far fa-heart"; likeButtonElement.addEventListener("click", function() { like(new URLSearchParams(new URL(discussionListItem.querySelector('a[data-cachedtitle="Пожаловаться"]').href).search).get("post_id"), xftoken); likeButtonElement.className = "threadControl Tooltip OverlayTrigger fa fa-heart"; XenForo.stackAlert('Симпатия поставлена!', 1000); }); try { discussionListItem.querySelector("span.controls").appendChild(likeButtonElement); } catch(e) { console.log(discussionListItem); console.log(e); } }; const discussionListItems = document.querySelectorAll("div.discussionListItem"); for (let i = 0; i < discussionListItems.length; i++) { addLikeButton(discussionListItems[i]); } const observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (mutation.type === "childList") { mutation.addedNodes.forEach(function(node) { if (node.nodeType === Node.ELEMENT_NODE && node.classList.contains("discussionListItem")) { addLikeButton(node); } }); } }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); -
ImMALWARE revised this gist
Mar 8, 2023 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,8 +3,7 @@ // @version 1.0 // @description Прям как хотел огузок // @author MALWARE // @match https://zelenka.guru/forums/contests* // @grant none // @icon https://zelenka.guru/favicon.ico // ==/UserScript== -
ImMALWARE revised this gist
Mar 8, 2023 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,7 @@ // @description Прям как хотел огузок // @author MALWARE // @match https://zelenka.guru/forums/contests/ // @match https://zelenka.guru/forums/contests // @grant none // @icon https://zelenka.guru/favicon.ico // ==/UserScript== -
ImMALWARE created this gist
Mar 8, 2023 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ // ==UserScript== // @name Кнопка симпатии в розыгрышах // @version 1.0 // @description Прям как хотел огузок // @author MALWARE // @match https://zelenka.guru/forums/contests/ // @grant none // @icon https://zelenka.guru/favicon.ico // ==/UserScript== function like(post_id, xftoken) { const r = new XMLHttpRequest(); r.open("POST", "https://zelenka.guru/posts/"+post_id+"/like?_xfNoRedirect=1&_xfToken="+xftoken+"&_xfResponseType=json"); r.send(); } (function() { 'use strict'; const xftoken = document.querySelector('input[name="_xfToken"]').value; const discussionListItems = document.querySelectorAll("div.discussionListItem"); for (let i = 0; i < discussionListItems.length; i++) { const likeButtonElement = document.createElement("a"); likeButtonElement.className = "threadControl Tooltip OverlayTrigger far fa-heart"; likeButtonElement.addEventListener("click", function() { like(new URLSearchParams(new URL(discussionListItems[i].querySelector('a[data-cachedtitle="Пожаловаться"]').href).search).get("post_id"), xftoken); likeButtonElement.className = "threadControl Tooltip OverlayTrigger fa fa-heart"; XenForo.stackAlert('Симпатия поставлена!', 1000); }); discussionListItems[i].querySelector("span.controls").appendChild(likeButtonElement); } })();