您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Customize the PixelPlanet interface with extended personalization options and revert to default.
当前为
// ==UserScript== // @name Pixelplanet+ // @namespace http://tampermonkey.net/ // @version 4 // @author Pixel, join dsc.gg/turkmenlippf // @description Customize the PixelPlanet interface with extended personalization options and revert to default. // @match https://pixelplanet.fun/* // @grant GM_addStyle // @grant GM_addStyle // @grant GM_xmlhttpRequest // @grant GM_setClipboard // @icon https://files.catbox.moe/qb2prb.png // ==/UserScript== (function() { 'use strict'; GM_addStyle(` @import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css'); @import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans&display=swap'); `); // Varsayılan stiller const defaultCSS = ` body { margin: 0; font-family: 'Montserrat', sans-serif; font-size: 16px; background: #c4c4c4; } .menu > div { background-color: transparent !important; } `; // Kullanıcı ayarları const settings = { buttonColor: '#4CAF50', buttonHoverColor: '#ff91a6', fontColor: '#000000', fontSize: '16', fontFamily: 'Arial', menuColor: '#ffffff', backgroundOpacity: '1', backgroundImage: '', cursorURL: '' }; // Sayfa yüklendiğinde ayarları uygula applyStoredStyles(); // Buton ekle addCustomizationButton(); // Ayarları yükle ve uygula function applyStoredStyles() { const storedSettings = loadSettings(); applyCustomStyles(storedSettings); } // Ayarları localStorage'dan yükle function loadSettings() { Object.keys(settings).forEach(key => { settings[key] = getStoredValue(key, settings[key]); }); return settings; } // LocalStorage'dan bir değeri al function getStoredValue(key, defaultValue) { return localStorage.getItem(key) || defaultValue; } // LocalStorage'a bir değeri kaydet function setStoredValue(key, value) { localStorage.setItem(key, value); } // Stilleri uygula function applyCustomStyles({ buttonColor, buttonHoverColor, fontColor, fontSize, fontFamily, menuColor, backgroundOpacity, backgroundImage, cursorURL }) { GM_addStyle(` body { background-color: rgba(255, 255, 255, ${backgroundOpacity}); background-image: url(${backgroundImage}); font-size: ${fontSize}px; font-family: ${fontFamily}; color: ${fontColor}; } .actionbuttons, .actionbuttons button, .coorbox, .onlinebox, .cooldownbox, #palettebox { background-color: ${buttonColor} !important; color: white !important; } .actionbuttons:hover, .actionbuttons button:hover, .coorbox:hover, .onlinebox:hover, .cooldownbox:hover, #palettebox:hover { background-color: ${buttonHoverColor} !important; } .customMenu, .modal.USERAREA.show, .modal.HELP.show, .modal.SETTINGS.show { background-color: ${menuColor} !important; color: ${fontColor}; border-radius: 10px; box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); } .window.CHAT.show { background-image: url(${backgroundImage}) !important; background-size: cover; background-position: center; } * { cursor: url('${cursorURL}') 16 16, auto !important; } `); } // Buton ekle function addCustomizationButton() { const customizationButton = document.createElement('div'); customizationButton.id = 'customizationButton'; customizationButton.className = 'actionbuttons'; customizationButton.setAttribute('role', 'button'); customizationButton.innerHTML = ` <i class="fa fa-plus-square" aria-hidden="true" style="vertical-align: middle; font-size: 19px; color: #FFFFFF;"></i> `; customizationButton.style.position = 'fixed'; customizationButton.style.left = '16px'; customizationButton.style.top = '37%'; customizationButton.style.zIndex = '9999'; customizationButton.style.transform = 'translateY(-50%)'; document.body.appendChild(customizationButton); customizationButton.addEventListener('click', showCustomizationPanel); } // Ayar panelini göster function showCustomizationPanel() { const panelHTML = ` <div class="modal SETTINGS show customMenu" style=" z-index: 9999; width: 50%; max-width: 500px; max-height: 80vh; overflow-y: auto; padding: 20px; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: #ffffff; border: 1px solid #ccc; border-radius: 12px; box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); transition: all 0.3s ease; font-family: 'Pixelify Sans', sans-serif; "> <h2 style="text-align: center; font-size: 1.4em; margin-bottom: 1em;">Settings</h2> <div class="modal-topbtn close" role="button" title="Close" tabindex="-1" style=" position: absolute; top: 10px; right: 10px; font-size: 1.2em; cursor: pointer; ">✕</div> <div class="content" style="display: flex; flex-direction: column; gap: 15px;"> <div class="setitem"> <label>Button Color:</label> <input type="color" id="buttonColorPicker" value="${settings.buttonColor}" /> </div> <div class="setitem"> <label>Button Hover Color:</label> <input type="color" id="buttonHoverColorPicker" value="${settings.buttonHoverColor}" /> </div> <div class="setitem"> <label>Font Color:</label> <input type="color" id="fontColorPicker" value="${settings.fontColor}" /> </div> <div class="setitem"> <label>Font Size:</label> <input type="number" id="fontSizePicker" min="10" max="30" value="${settings.fontSize}" style="width: 80px;" /> px </div> <div class="setitem"> <label>Font Family:</label> <select id="fontFamilyPicker" style="padding: 5px; border-radius: 5px;"> <option value="Arial" ${settings.fontFamily === 'Arial' ? 'selected' : ''}>Arial</option> <option value="Verdana" ${settings.fontFamily === 'Verdana' ? 'selected' : ''}>Verdana</option> <option value="Helvetica" ${settings.fontFamily === 'Helvetica' ? 'selected' : ''}>Helvetica</option> <option value="Tahoma" ${settings.fontFamily === 'Tahoma' ? 'selected' : ''}>Tahoma</option> <option value="Pixelify Sans" ${settings.fontFamily === 'Pixelify Sans' ? 'selected' : ''}>Pixelify Sans</option> </select> </div> <div class="setitem"> <label>Menu Color:</label> <input type="color" id="menuColorPicker" value="${settings.menuColor}" /> </div> <div class="setitem"> <label>Background Opacity:</label> <input type="range" id="backgroundOpacity" min="0.1" max="1" step="0.1" value="${settings.backgroundOpacity}" /> </div> <div class="setitem"> <label>Chat Background Image URL:</label> <input type="text" id="backgroundImage" value="${settings.backgroundImage}" style="width: 100%;" placeholder="Enter URL here" /> </div> <div class="setitem"> <label>Custom Cursor URL:</label> <input type="text" id="cursorURL" value="${settings.cursorURL}" style="width: 100%;" placeholder="Enter cursor URL here" /> </div> <button id="saveButton" style="background-color: #4CAF50; color: white; padding: 10px 20px; border: none; cursor: pointer; border-radius: 5px;">Save</button> <button id="resetButton" style="background-color: #f44336; color: white; padding: 10px 20px; border: none; cursor: pointer; border-radius: 5px;">Reset to Default</button> <button id="exportButton" style="background-color: #2196F3; color: white; padding: 10px 20px; border: none; cursor: pointer; border-radius: 5px;">Export Settings</button> <button id="importButton" style="background-color: #FF9800; color: white; padding: 10px 20px; border: none; cursor: pointer; border-radius: 5px;">Import Settings</button> </div> </div> `; const modalContainer = document.createElement('div'); modalContainer.innerHTML = panelHTML; document.body.appendChild(modalContainer); // Kapatma butonuna tıklandığında paneli kapat document.querySelector('.modal-topbtn.close').addEventListener('click', () => { modalContainer.remove(); }); // Ayarları kaydet document.getElementById('saveButton').addEventListener('click', () => { settings.buttonColor = document.getElementById('buttonColorPicker').value; settings.buttonHoverColor = document.getElementById('buttonHoverColorPicker').value; settings.fontColor = document.getElementById('fontColorPicker').value; settings.fontSize = document.getElementById('fontSizePicker').value; settings.fontFamily = document.getElementById('fontFamilyPicker').value; settings.menuColor = document.getElementById('menuColorPicker').value; settings.backgroundOpacity = document.getElementById('backgroundOpacity').value; settings.backgroundImage = document.getElementById('backgroundImage').value; settings.cursorURL = document.getElementById('cursorURL').value; saveSettings(); applyStoredStyles(); modalContainer.remove(); }); // Varsayılan ayarlara sıfırlama document.getElementById('resetButton').addEventListener('click', () => { resetToDefaultStyles(); modalContainer.remove(); }); // Ayarları dışa aktar document.getElementById('exportButton').addEventListener('click', () => { const jsonSettings = JSON.stringify(settings); const blob = new Blob([jsonSettings], { type: 'application/json' }); const link = document.createElement('a'); link.href = URL.createObjectURL(blob); link.download = 'settings.json'; link.click(); }); // Ayarları içe aktar document.getElementById('importButton').addEventListener('click', () => { const input = document.createElement('input'); input.type = 'file'; input.accept = '.json'; input.click(); input.addEventListener('change', (event) => { const file = event.target.files[0]; if (file && file.name.endsWith('.json')) { const reader = new FileReader(); reader.onload = function () { try { const importedSettings = JSON.parse(reader.result); Object.keys(importedSettings).forEach(key => { settings[key] = importedSettings[key]; }); saveSettings(); applyStoredStyles(); } catch (e) { alert('Failed to import settings.'); } }; reader.readAsText(file); } else { alert('Invalid file format.'); } }); }); } // Ayarları kaydet function saveSettings() { Object.keys(settings).forEach(key => { setStoredValue(key, settings[key]); }); } // Varsayılan ayarlara dön function resetToDefaultStyles() { settings.buttonColor = rgba(226, 226, 226, 0.80); settings.buttonHoverColor = '#ff91a6'; settings.fontColor = '#000000'; settings.fontSize = '16'; settings.fontFamily = 'Arial'; settings.menuColor = '#ffffff'; settings.backgroundOpacity = '1'; settings.backgroundImage = ''; settings.cursorURL = ''; saveSettings(); applyStoredStyles(); } })(); (function() { 'use strict'; // Buton oluşturma let uploadBtn = document.createElement("button"); uploadBtn.innerHTML = '<img src="https://files.catbox.moe/potman.png" style="width: 16px; height: 16px;">'; // Ataş ikonu uploadBtn.style.padding = "5px"; uploadBtn.style.fontSize = "12px"; uploadBtn.style.color = "white"; uploadBtn.style.border = "1px solid black"; // 1px kalınlığında siyah border eklendi uploadBtn.style.borderRadius = "3px"; // İsteğe bağlı: Köşeleri yuvarlak yapmak için uploadBtn.style.cursor = "pointer"; uploadBtn.style.display = "flex"; uploadBtn.style.alignItems = "center"; uploadBtn.style.justifyContent = "center"; uploadBtn.style.marginLeft = "5px"; // Sohbet giriş kutusundan biraz uzaklaştırmak için uploadBtn.style.backgroundColor = "transparent"; // Arka planı şeffaf yap // Dosya seçme input'u let fileInput = document.createElement("input"); fileInput.type = "file"; fileInput.style.display = "none"; document.body.appendChild(fileInput); // Butona tıklanınca dosya seç uploadBtn.addEventListener("click", function() { fileInput.click(); }); fileInput.addEventListener("change", function() { if (fileInput.files.length === 0) return; let file = fileInput.files[0]; let formData = new FormData(); formData.append("reqtype", "fileupload"); formData.append("userhash", ""); formData.append("fileToUpload", file); GM_xmlhttpRequest({ method: "POST", url: "https://catbox.moe/user/api.php", data: formData, onload: function(response) { if (response.status === 200) { let link = response.responseText.trim(); GM_setClipboard(link); // Sohbet kutusuna linki ekle let chatInput = document.querySelector("input.chtipt"); if (chatInput) { chatInput.value = link; } } else { console.error("Yükleme başarısız oldu!"); } } }); }); // Sohbet kutusunu bul ve butonu içine ekle let chatInputContainer = document.querySelector("form.chatinput"); if (chatInputContainer) { chatInputContainer.appendChild(uploadBtn); } else { console.error("Sohbet giriş kutusu bulunamadı!"); } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址