Skip to content

Instantly share code, notes, and snippets.

@6ixfalls
Last active June 23, 2023 04:35
Show Gist options
  • Save 6ixfalls/f3f6eee11b6d7c4584f2bd3ef94bbdf2 to your computer and use it in GitHub Desktop.
Save 6ixfalls/f3f6eee11b6d7c4584f2bd3ef94bbdf2 to your computer and use it in GitHub Desktop.
Changes for RoGold ultimate to work better with other extensions, and look nicer in general.
// ==UserScript==
// @name RoGold Changes
// @namespace http://roblox.com/
// @version 1.2.2
// @description try to take over the world!
// @author 6ixfalls
// @match https://*.roblox.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=roblox.com
// @updateURL https://gist.github.com/6ixfalls/f3f6eee11b6d7c4584f2bd3ef94bbdf2/raw/rguchanges.user.js
// @downloadURL https://gist.github.com/6ixfalls/f3f6eee11b6d7c4584f2bd3ef94bbdf2/raw/rguchanges.user.js
// @grant none
// ==/UserScript==
const checkElement = async (selector, dom) => {
if (!dom) dom = document;
while ( dom.querySelector(selector) === null) {
await new Promise( resolve => { requestAnimationFrame(resolve) } )
}
return dom.querySelector(selector);
};
const delay = ms => new Promise(res => setTimeout(res, ms));
const clamp = (num, min, max) => Math.min(Math.max(num, min), max);
const lerp = (start, end, delta) => (1-delta)*start+delta*end;
const overrideScrolling = async element => {
element.classList.add("done");
let goalLeft = 0;
let currentLeft = 0;
if (element.classList.contains("game-cards")) {
await checkElement("li[id^='rg-']");
}
element.addEventListener("wheel", e => {
e.preventDefault();
goalLeft = clamp(goalLeft + e.deltaY, 0, element.scrollWidth - element.offsetWidth);
}, {capture: true});
var cb = function () {
currentLeft = lerp(currentLeft, goalLeft, 0.25);
element.scrollLeft = currentLeft;
requestAnimationFrame(cb);
}
requestAnimationFrame(cb);
}
(async function() {
'use strict';
if (document.URL.includes("roblox.com/games/")) {
document.querySelector("#game-detail-page > div.col-xs-12.btr-game-main-container.section-content").className = "col-xs-12 section-content game-main-content remove-panel follow-button-enabled";
let wrapper = await checkElement("#game-detail-page");
let item = await checkElement("#game-detail-page > div.col-xs-12.btr-mid-container");
wrapper.append(item);
let carosuelWrapper = await checkElement("#game-detail-page > div.col-xs-12.section-content.game-main-content.remove-panel.follow-button-enabled");
let carosuelReparent = await checkElement("#game-detail-page > div.col-xs-12.section-content.game-main-content.remove-panel.follow-button-enabled > div.col-xs-12.game-main-content.remove-panel.follow-button-enabled");
let children = Array.from(carosuelReparent.children);
children.forEach(child => {
carosuelWrapper.append(child);
});
carosuelReparent.remove();
let gameDescription = await checkElement("#game-detail-page > div.col-xs-12.section-content.game-main-content.remove-panel.follow-button-enabled > div.remove-panel.btr-description");
let gameSlideHolder = await checkElement("#game-detail-page > div.col-xs-12.rbx-tabs-horizontal > div > div.game-slide-holder");
gameSlideHolder.after(gameDescription);
let tabs = await checkElement("#horizontal-tabs");
tabs.style = "display: flex;";
let gameInstances = await checkElement("#game-instances");
gameInstances.classList.remove("section-content");
let store = await checkElement("#store");
store.classList.remove("section-content");
let badges = await checkElement("#game-detail-page > div.col-xs-12.btr-mid-container");
gameDescription.after(badges);
let rarityText = document.querySelectorAll("#game-badges-container > game-badges-list > div > ul > li > div.badge-content > ul > li:nth-child(1) > div.font-header-2.badge-stats-info.ng-binding");
rarityText.forEach(child => {child.innerHTML = child.innerHTML.split("(")[0].trim()});
} else if (document.URL.includes("roblox.com/my/account")) {
let span = document.createElement("span");
span.className = "hidden user-account-header";
span.innerHTML = "test";
document.querySelector("body").appendChild(span);
}
let carosuels = document.querySelectorAll(".game-carousel, .hlist");
carosuels.forEach((carosuel) => {
if (carosuel.parentNode.classList.contains("horizontally-scrollable")) {
overrideScrolling(carosuel.parentNode);
} else {
overrideScrolling(carosuel);
}
});
const observer = new MutationObserver(() => {
const elements = document.querySelectorAll(".game-carousel, .hlist");
elements.forEach((carosuel) => {
if (carosuel.parentNode.classList.contains("horizontally-scrollable") && !carosuel.parentNode.classList.contains("done")) {
overrideScrolling(carosuel.parentNode);
} else if (!carosuel.classList.contains("done")) {
overrideScrolling(carosuel);
}
});
});
observer.observe(document.body, {
childList: true,
subtree: true,
});
let backdropBlur = await checkElement(".backdrop-blur");
let blurContainer = await checkElement("#navigation-container");
blurContainer.appendChild(backdropBlur);
})();
/* ==UserStyle==
@name RoGold Changes
@namespace roblox.com
@version 1.0.2
@description try to take over the world!
@updateURL https://gist.github.com/6ixfalls/f3f6eee11b6d7c4584f2bd3ef94bbdf2/raw/rgustyles.user.css
==/UserStyle== */
@-moz-document domain("roblox.com") {
body * {
transition: all 0.2s;
/* Comment out if you dont want this */
}
#mCSB_2_container {
transition: none !important;
}
#mCSB_2_dragger_vertical {
transition: none !important;
}
.ropro-icon:after {
content: '';
background-color: blue;
}
.ropro-icon {
margin: 0 !important;
filter: contrast(5) brightness(0.6);
mix-blend-mode: screen;
border-radius: 0px;
border-color: transparent;
}
.ropro-icon:hover {
filter: contrast(5) brightness(1);
border-radius: 5px !important;
}
.left-col-list:nth-child(15) {
display: none !important;
color: black;
}
.left-col-list li {
display: flex !important;
}
#navigation > div > div.simplebar-wrapper > div.simplebar-mask > div > div > div > ul > li:nth-child(14) {
display: none !important;
}
#navigation > div > div.simplebar-wrapper > div.simplebar-mask > div > div > div > ul > li:nth-child(15) {
display: none !important;
}
#navigation > div > div.simplebar-wrapper > div.simplebar-mask > div > div > div > ul > li:nth-child(16) {
display: none !important;
}
#navigation > div > div.simplebar-wrapper > div.simplebar-mask > div > div > div > ul > li:nth-child(17) {
display: none !important;
}
.clear-search.icon-actions-clear-sm {
top: 8px !important;
}
.clear-search.icon-actions-clear-sm span {
top: 0 !important;
bottom: 0 !important;
left: 0 !important;
}
.tooltiptext {
display: none !important;
}
.profile-header-top {
width: 100%;
}
.profile-header-top ~ .profile-social-networks {
top: 51.5%;
}
#container-main > div.content > div.profile-container.ng-scope > div > div.section.profile-header > div > div.profile-header-top > div.header-caption {
display: block !important;
float: right;
width: calc(100% - 128px) !important;
}
#reputationDiv {
bottom: 16px;
right: 8px;
position: absolute;
display: block;
white-space: nowrap;
}
.ropro-user-info:hover .ropro-info-card {
display: flex !important;
}
.ropro-info-card {
filter: drop-shadow(0px 0px 0px #363636) !important;
}
.ropro-info-card div div {
height: auto !important;
flex-direction: column;
}
.simplebar-wrapper,
.simplebar-content {
width: inherit !important;
}
.wearing-div .wearing-name {
display: none !important;
}
.wearing-div:hover .wearing-name {
display: block !important;
}
#game-details-play-button-container > button.btn-full-width.btn-common-play-game-lg.btn-primary-md.btn-min-width.random-server-button {
align-items: center;
justify-content: center;
}
#game-details-play-button-container > button.btn-full-width.btn-common-play-game-lg.btn-primary-md.btn-min-width.random-server-button > span {
margin: auto !important;
background-size: 22px 22px !important;
position: absolute;
}
div.font-header-2.badge-stats-info {
font-size: 16px !important;
width: 130px;
}
div.font-header-2.badge-stats-info.ng-binding {
margin-bottom: 0 !important;
}
ul.badge-stats-container li div.text-label.ng-binding {
text-align: center;
}
ul.badge-stats-container li {
padding: 0 !important;
margin-right: 7px !important;
}
span.rbx-private-server-subscription-alert-text {
font-size: 12px !important;
color: #ff6a70 !important;
}
div.rbx-private-server-inactive,
div.rbx-private-server-subscription-alert.text-alert {
display: flex;
align-items: center;
justify-content: center;
font-size: 12px !important;
}
div.rbx-private-server-subscription-alert.text-alert .icon-remove {
filter: brightness(0) saturate(100%) invert(50%) sepia(40%) saturate(783%) hue-rotate(308deg) brightness(102%) contrast(103%);
margin: 0 3px;
}
div.rbx-private-server-inactive {
color: #c2c2c2 !important;
}
div.rbx-private-server-inactive .icon-turn-off {
filter: brightness(0) saturate(100%) invert(87%) sepia(4%) saturate(7%) hue-rotate(327deg) brightness(89%) contrast(93%);
margin: 0 3px;
}
.ropro-cloud-play-container {
display: none !important;
}
.ropro-cloud-play-enabled .voting-panel {
margin-left: 0 !important;
}
.rogold-page .section .form-group:not(.account-security-settings-container):not(.save-settings-container):not(.blocked-users):not(.blocked-users-amt):not(.ng-scope) {
width: 100%;
height: 100%;
border: 0;
}
.rogold-page .section .form-group .select-group input[type=color] {
width: 100%;
height: 100%;
border: 0;
padding-right: 80%;
margin-right: auto;
float: none;
}
/* <@222804393030844438> IAmVolvic */
.configure-group configure-group-roles .configure-group-roles-list.menu-vertical-container .roles-list {
margin-top: 10px;
/* -- optional if you want extra spacing */
width: 80%;
width: calc(100% - 24px);
position: relative;
float: left;
/* margin-left: 12px; -- Adds unneeded space between the title Roles and the box */
}
.configure-group configure-group-roles .configure-group-roles-list.menu-vertical-container .roles-list .menu-link {
display: flex;
width: 100%;
/* float: left; */
/* margin-top: 6px; */
flex-direction: column;
justify-content: center;
}
.configure-group configure-group-roles .configure-group-roles-list.menu-vertical-container .roles-list .menu-link .menu-option-content {
display: flex;
width: 100%;
float: left;
padding: 10px 0px 0px 10px;
}
.see-all-link::after {
margin-top: 7px;
/* Creating the problem where the arrow isn't centered... But this could be used somewhere else. */
}
.dark-theme .input-group .input-field {
margin-right: 10px;
display: inline-block;
padding-left: 38px;
z-index: 0;
border-right: 1px solid hsla(0, 0%, 100%, .2);
}
.chat-body .chat-search {
margin-top: 6px;
background-color: transparent!important;
position: relative;
height: 26px;
margin-bottom: 10px;
}
.backdrop-blur {
width: 100vw;
height: 100vh;
position: fixed;
}
.backdrop-blur.ng-hide {
display: block !important;
backdrop-filter: blur(0px) !important;
background: transparent !important;
pointer-events: none;
}
#roproServerFiltersMiniButton {
z-index: 10 !important;
}
.btr-explorer, .btr-properties {
background: var(--background);
border: 0;
}
.btr-explorer *, .btr-properties * {
transition: none !important;
}
.btr-explorer-header, .btr-properties-header, .btr-property-group {
background: var(--third) !important;
color: var(--text-color) !important;
border: 0;
}
.btr-explorer-filter {
color: var(--text-color);
border: 0;
}
.btr-explorer-filter-input::placeholder {
color: var(--text-color) !important;
}
.btr-explorer-list, .btr-properties-container {
border: 0;
}
}
@-moz-document url-prefix("https://ropro.io/twitterFrame.php") {
* {
transition: all 0.1s;
}
.timeline-Widget {
background: transparent;
}
.timeline-Tweet:hover {
background-color: rgba(30, 30, 30, 0.7);
}
.TweetAuthor-link.Identity.u-linkBlend {
transition: none;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment