Builded/builded.user.js
swee 3814ebdcff
Some checks are pending
Check syntax / check (push) Waiting to run
Update builded.user.js
2025-01-03 22:52:05 -08:00

50 lines
2.1 KiB
JavaScript

/*jshint esversion: 6 */
// ==UserScript==
// @name Builded
// @namespace https://git.swee.codes/swee/Builded
// @version 0.0.1.2
// @description Vencord, but for Guilded
// @author Swee
// @match https://*.guilded.gg/*
// @match https://builded.swee.codes/settings
// @icon https://git.swee.codes/swee/Builded/raw/branch/main/Builded-solid.svg
// @grant GM_setValue
// @grant GM_getValue
// @require https://code.jquery.com/jquery-3.7.1.min.js
// @require https://github.com/pie6k/jquery.initialize/raw/refs/heads/master/jquery.initialize.min.js
// @run-at document-end
// ==/UserScript==
let settings_HTML = `
<p>If you see this text, the userscript successfully rendered the settings page.</p>
`;
let settings_entry = `
<div class="PersistentActionMenuSection-container PersistentActionMenuSection-container-orientation-vertical">
<div class="DesktopOptionsControlOptionHeader-container">
<div class="DesktopOptionsControlOptionHeader-header-text">Builded</div>
</div>
<div class="PersistentActionMenuSection-sections-wrapper PersistentActionMenu-menu-section DesktopOptionsControl-persistent-action-menu-section">
<div class="PersistentActionMenuItem-container">
<span class="RouteLink-disabled">
<div class="DesktopOptionsControlItemTemplate-container" onclick="openSettings();">
<div class="DesktopOptionsControlItemTemplate-label-text">
Open Settings
</div>
</div>
</span>
</div>
</div>
`
function settings() {
let win = window.open("https://builded.swee.codes/settings", "ree", `titlebar=yes,menubar=no,height=500px,width=300px,menubar=no,status=no`);
}
if (location.host == "www.guilded.gg") {
console.info("Guilded.GG detected.");
$.initialize('.DesktopOptionsControl-persistent-menu', function() {
console.info("Settings opened!")
$(this).innerHTML += settings_entry;
});
} else {
document.body.innerHTML += settings_HTML;
}
console.info("Builded Loaded <3");