Skip to content

Instantly share code, notes, and snippets.

View No-Eul's full-sized avatar
🥝
Hehe :3

NoEul No-Eul

🥝
Hehe :3
View GitHub Profile
@No-Eul
No-Eul / HideDiscordBlockedMessage.js
Last active February 12, 2024 10:33
Hide Blocked Message in Discord
var hideBlockedMessage = setInterval(() => {
document.querySelectorAll('div[class^="groupStart"]') // Get all the 'Blocked message's
.forEach(blockMsg => blockMsg.hidden ? void undefined : blockMsg.hidden = true) // Then change 'hidden' value of the tags to true if it isn't hidden
}, 50); // period; You can remove this value, but it may be increase stress on the browser or client
// clearInterval(hideBlockedMessage);
// If you want to show the blocked message again, you can run this code. Then go to other channel and come back, you'll see the hidden message.
@No-Eul
No-Eul / GettingHKLevelRanking.java
Last active October 13, 2020 07:12
Getting HK Level Ranking for Java with Jsoup library
import org.jsoup.Jsoup;
import org.jsoup.nodes.Element;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) throws IOException {
String format = "%-6s %-5s %s\n";
@No-Eul
No-Eul / GettingHKLevelRanking.js
Created October 13, 2020 07:13
Getting HK Level Ranking for JavaScript with MessengerBot R
function getHKLevelRank(timeout) {
if (timeout === undefined) timeout = 5000;
const format = "%-6s %-5s %s\n",
rankData = org.jsoup.Jsoup.connect("https://leaderboard.hkdev.services/")
.timeout(timeout).get()
.getElementsByClass("table table-hover table-condensed").select("tr");
let result = "";
for (let i = 0; i < rankData.size(); i++) {
@No-Eul
No-Eul / Main.java
Created October 25, 2020 07:16
HK for Developers Client SourceCode
package com.noeul.hk.client;
import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
import com.sun.javafx.application.PlatformImpl;
import javafx.embed.swing.JFXPanel;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
@No-Eul
No-Eul / DisablePingOnReply.js
Last active July 13, 2024 19:36
Set to disable reply ping to default
(this.disablePingToDefault = () => {
this.disablePingToDefault.interval = setInterval(() => {
if (this.disablePingToDefault.currentUrl !== location.href) { // Cached url is not equal to 'location.href', do the following:
if (this.disablePingToDefault.observer !== undefined) // If an observer which created at previous is exist,
this.disablePingToDefault.observer.disconnect(); // disconnect it.
else { // If it wasn't,
// Create new instance to detect insertion of the reply box.
this.disablePingToDefault.observer = new MutationObserver(() => {
let pingButton = document.querySelector('div[class*="mentionButton"]'); // Get ping switch in reply box.
if (pingButton !== null) pingButton.click(); // Click if it's not null. Then reply ping will be disable.
@No-Eul
No-Eul / ᅟLeaderboard.js
Last active January 28, 2021 17:59
HKDev Leaderboard in JavaScript with Rhino JS & JDA & HKLeaderboard.jar
const Class = java.lang.Class,
JavaArray = java.lang.reflect.Array;
let jarFiles = JavaArray.newInstance(Class.forName("java.net.URL"), 1);
JavaArray.set(jarFiles, 0, new java.io.File("HKLeaderboard-1.0.0.jar").toURI().toURL());
const Enum = java.lang.Enum,
Integer = java.lang.Integer,
JavaString = java.lang.String;
let classLoader = java.net.URLClassLoader.newInstance(jarFiles),
leaderBoardClass = Class.forName("com.noeul.discord.hk.leaderboard.Leaderboard", true, classLoader),
@No-Eul
No-Eul / HideChannelNotice.js
Last active April 8, 2022 09:11
Hide Channel Notice in Channel Nav. Bar for Discord
this.hideChannelNotice = setInterval(() => {
if (this.hideChannelNotice.currentUrl !== location.href) { // Cached url is not equal to location.href, do the following:
let $ = document.querySelector("div[class|=channelNotice]"); // Get channel notice box in channel navigation bar.
if ($ !== null) $.hidden = true; // Hide in display if it's not null.
this.hideChannelNotice.currentUrl = location.href; // Then cache current url.
}
}, 50); // I set 50 millis delay for waiting time. This task will be run every 50 milliseconds.
this.showChannelNotice = () => { // This function changes to original setting; If you wanna change it that way, you can input 'showChannelNotice();' into the console.
@No-Eul
No-Eul / ShortestDiscordExperiments.js
Last active June 16, 2024 15:19
Enable Discord experiment options with the shortest code.
// Notice: This code is no longer working and deprecated
((
$,
f = n => Object.values($._dispatcher._actionHandlers._dependencyGraph.nodes)
.find($ => $.name == n)
.actionHandler.CONNECTION_OPEN
) => {
try {
f`ExperimentStore`({ user: { flags: ++$.getCurrentUser().flags }, type: "CONNECTION_OPEN" });
@No-Eul
No-Eul / DiscordUserscriptReadme.md
Last active January 12, 2023 19:58
The Read-me File to Notify for My Discord Userscripts

Copy the userscript, and paste into the console of your browser or Discord client!

📌 Before Opening DevTools

Discord ᅟhas updated to prevent users from easily opening the console in their client. For the reason, you have to do first before you open the console:

  • Open the file in the following path:
    • Windows: %APPDATA%\Discord\settings.json
    • macOS: (In macOS' case, the first or second may not exist but that's fine. If it exist, proceed with this work for only the file in one path.)
      • ~/Library/Application Support/Discord/settings.json or
      • /Library/Application Support/Discord/settings.json
    • Linux: (Also in Linux's case, proceed that like macOS.)
@No-Eul
No-Eul / GrantAllAchievements.js
Last active May 18, 2022 14:14
Userscript and Local Storage Data Value to Grant All Achievements of Power Mode (Party Mode) in Discord
// The userscript file to grant all archievements w/o uncomfortable work
// This will be kept forever, once applied.
// After application, you will need to reload Discord.
($ => {
$.contentWindow.localStorage.PoggermodeAchievementStore = JSON.stringify({
_state: {
unlockedAchievements: [...Array(20)].map((_, i) => ({ achievementId: i, dateUnlocked: 0 }))
// You can set value of 'dateUnlocked' to current time with the code 'Date.now()' instead of '0'.
},