您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Restores the look of the item viewer to look more like how it did in 2016
当前为
// ==UserScript== // @name Roblox 2016 Item Viewer // @namespace http://tampermonkey.net/ // @version 1.0 // @description Restores the look of the item viewer to look more like how it did in 2016 // @author Xx_3mdiv1der78_xX [AKA: The_Noise.] // @match https://www.roblox.com/catalog/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; const style = document.createElement('style'); style.textContent = ` /* Banner ad container */ .page-content:before { content: " "; display: block; width: 728px; height: 90px; margin: -12px auto 5px auto; background-image: url('https://images.rbxcdn.com/bb3b528306366a8b1a5a6ca40ead504a.png'); background-size: 728px 90px; background-repeat: no-repeat; color: #666; font-size: 12px; text-align: center; padding-bottom: 14px; position: relative; left: calc(50% - 29px); transform: translateX(-50%); } /* Skyscraper ad container */ .item-details-wrapper:after { content: " "; display: block; width: 160px; height: 600px; position: absolute; right: -206px; top: -10px; background-image: url('https://images.rbxcdn.com/e1f0ccbb998d94f80f20b0134a013def.png'); background-size: 160px 600px; background-repeat: no-repeat; color: #666; font-size: 12px; text-align: center; padding-bottom: 14px; } /* White box for item details with a border */ .item-details-wrapper { background: #fff !important; border: 10px solid #FFFFFF !important; border-radius: 3px !important; padding: 12px !important; margin: 12px auto !important; box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important; position: relative; } /* Thumbnail outline */ .thumbnail-holder { border: 1px solid #B8B8B8 !important; border-radius: 3px !important; padding: 3px !important; } /* Recommendations styling */ .item-card-caption .recommended-creator { margin-top: 3px !important; font-size: 12px !important; } .item-card-caption .recommended-creator-by { margin-right: 3px !important; color: #666 !important; } .item-card-caption .recommended-creator .xsmall { font-size: 12px !important; line-height: 14px !important; } .item-card-caption .recommended-creator .text-link { color: #00A2FF !important; /* Blue text */ text-decoration: none !important; } .item-card-caption .recommended-creator .text-label { color: #666 !important; font-weight: normal !important; } /* Recommendations header */ .item-list-carousel-title h1.font-header-1 { font-size: 20px !important; font-weight: 400 !important; color: #333 !important; } /* Hide ads on smaller screens */ @media (max-width: 1358px) { .item-details-wrapper:after { display: none; } } @media (max-width: 1174px) { .item-details-wrapper:after { display: none; } } `; document.head.appendChild(style); function updateStyles() { // Only remove empty item-details-wrapper elements const existingWrappers = document.querySelectorAll('.item-details-wrapper'); existingWrappers.forEach(wrapper => { // Check if this wrapper contains the item content const hasThumbnail = wrapper.querySelector('#item-thumbnail-container-frontend'); const hasInfo = wrapper.querySelector('#item-info-container-frontend'); // Only remove if it doesn't contain the important content if (!hasThumbnail && !hasInfo) { wrapper.remove(); } }); // Check if we already have a wrapper with content const existingContentWrapper = document.querySelector('.item-details-wrapper #item-thumbnail-container-frontend'); if (existingContentWrapper) { return; // Exit if we already have a proper wrapper } // Create a new wrapper only if we don't have one with content const itemDetailsWrapper = document.createElement('div'); itemDetailsWrapper.className = 'item-details-wrapper'; // Move the relevant elements into the new wrapper const thumbnailContainer = document.querySelector('#item-thumbnail-container-frontend'); const infoContainer = document.querySelector('#item-info-container-frontend'); const socialContainer = document.querySelector('.item-social-container'); if (thumbnailContainer && infoContainer) { itemDetailsWrapper.appendChild(thumbnailContainer); itemDetailsWrapper.appendChild(infoContainer); if (socialContainer) { itemDetailsWrapper.appendChild(socialContainer); } // Insert the new wrapper into the page const pageContent = document.querySelector('.page-content'); if (pageContent) { pageContent.insertBefore(itemDetailsWrapper, pageContent.firstChild); } } // Remove the item-details-container if it exists const detailsContainer = document.querySelector('.item-details-container'); if (detailsContainer) { detailsContainer.remove(); // Ensure it is removed from the DOM } // Update creator sections const creatorDivs = document.querySelectorAll('.item-card-caption .item-card-creator:not(.recommended-creator)'); creatorDivs.forEach(div => { div.classList.add('recommended-creator'); const span = div.querySelector('span'); const link = div.querySelector('a'); if (!span || !link) return; const byLabel = document.createElement('span'); byLabel.className = 'xsmall text-label recommended-creator-by'; byLabel.textContent = 'By'; link.className = 'xsmall text-overflow text-link ng-binding'; span.textContent = ''; span.append(byLabel, ' ', link); }); // Update Recommendations header const header = document.querySelector('.item-list-carousel-title h1.font-header-1'); if (header && header.textContent.trim() === 'Recommendations') { header.textContent = 'Recommended Items'; } } // Run on page load and watch for changes let timeout; const observer = new MutationObserver(() => { clearTimeout(timeout); timeout = setTimeout(updateStyles, 100); }); function initObserver() { const container = document.querySelector('.item-list-carousel'); if (container) { updateStyles(); observer.observe(container, { childList: true, subtree: true }); } else { setTimeout(initObserver, 100); } } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', initObserver); } else { initObserver(); } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址