Baldr's Site API Key Manager by Xade[3217170]

Manage your API key with a visually appealing interface and personalized credits by Xade.

Baldr's Site API Key Manager by Xade[3217170] was deleted due to: Report #62955.

Appeal submitted by the author:

I believe that there is a use for this script. After reviewing the guidelines, I modified my code for an appeal. Please provide feedback.


// ==UserScript==
// @name Baldr's Site API Key Manager by Xade[3217170]
// @namespace http://tampermonkey.net/
// @version 1.6
// @description API Key Handler for Baldr's Site by Xade[3217170]: Stores keys for easy pasting and includes a link to the author's profile for more info.
// @author Xade
// @match https://oran.pw/baldrstargets/*
// @grant none
// @run-at document-end
// ==/UserScript==

(function() {
'use strict';

// Create the main container for the master button and the sliding panel
const container = document.createElement('div');
container.style.cssText = `
position: fixed;
top: 10px;
left: 10px;
z-index: 1000;
`;

// Create the sliding panel that will contain the buttons
const buttonContainer = document.createElement('div');
buttonContainer.style.cssText = `
display: none; // Start hidden and will be shown on master button click
flex-direction: column; // Stack buttons vertically
background-color: #f0f0f0; // Optional: background color for the panel
padding: 5px;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
margin-top: 5px; // Space between the master button and the panel
`;

// Create the master button to toggle the sliding panel
const masterButton = document.createElement('button');
masterButton.textContent = 'API';
masterButton.style.cssText = `
background-color: #4CAF50;
color: white;
border: none;
padding: 8px 16px;
cursor: pointer;
border-radius: 8px;
font-size: 14px;
`;
masterButton.onclick = () => {
// Toggle the display of the button container to show or hide it
buttonContainer.style.display = buttonContainer.style.display === 'none' ? 'block' : 'none';
};

// Append elements to the document
document.body.appendChild(container);
container.appendChild(masterButton);
container.appendChild(buttonContainer);

// Function to add buttons to the sliding panel
const addButton = (text, color, action) => {
const button = document.createElement('button');
button.textContent = text;
button.style.cssText = `
background-color: ${color};
color: white;
border: none;
padding: 6px 12px;
margin: 2px;
border-radius: 8px;
cursor: pointer;
font-size: 12px;
`;
button.onclick = action;
buttonContainer.appendChild(button);
};

// Add functionality buttons
addButton('Fetch Key', '#f44336', () => window.open('https://www.torn.com/preferences.php#tab=api', '_blank'));
addButton('Add Key', '#4CAF50', () => {
const apiKey = prompt('Enter your API Key to store:');
if (apiKey) {
localStorage.setItem('baldrsApiKey', apiKey);
alert('API Key stored successfully!');
}
});
addButton('Paste Key', '#2196F3', () => {
const storedApiKey = localStorage.getItem('baldrsApiKey');
const inputField = document.querySelector('input[type="text"]');
if (storedApiKey && inputField) {
inputField.value = storedApiKey;
alert('API Key pasted successfully!');
} else {
alert('No API Key found or input field missing.');
}
});
addButton('About', '#FFA500', () => {
const message = 'This tool helps manage API keys for Baldr\'s Site with ease. ' +
'Developed by Xade[3217170]. Visit my Torn profile for more information. ' +
'Would you like to visit now?';
if (confirm(message)) {
window.open('https://www.torn.com/profiles.php?XID=3217170', '_blank');
}
});
})();

As a result of this appeal, a moderator undeleted this script.

The script was deleted as it was completely empty. With the code added in the appeal is ok.