This commit is contained in:
parent
a0852c4dce
commit
3814ebdcff
1 changed files with 19 additions and 2 deletions
|
@ -18,14 +18,31 @@
|
|||
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('.OptionsMenu-options-control', function() {
|
||||
$.initialize('.DesktopOptionsControl-persistent-menu', function() {
|
||||
console.info("Settings opened!")
|
||||
console.info($(this))
|
||||
$(this).innerHTML += settings_entry;
|
||||
});
|
||||
} else {
|
||||
document.body.innerHTML += settings_HTML;
|
||||
|
|
Loading…
Reference in a new issue