Changes to toolbox.scroll.pub

root
root
25 days ago
Initial commit
body.html
Changed around line 1
+
+
+
+
+
+
+
+
+
+
+
+

Hash Generator

+
+
+
+
+
+
+
+
+
+

Port Scanner

+
+
+
+
+
+
+
+
+
+

Text Encoder

+
+
+
+
+
+
+
+
+
+
+
+

Built with passion by developers, for developers

+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://toolbox.scroll.pub
+ metaTags
+ editButton /edit.html
+ title Web Developer's Toolbox
+ style.css
+ body.html
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "msg_01HvoxgbSQ31gyXz1oTsenGD",
+ "type": "message",
+ "role": "assistant",
+ "model": "claude-3-5-sonnet-20241022",
+ "content": [
+ {
+ "type": "text",
+ "text": "I'll create a website with various web tools. Here's a suitable domain name and implementation:\n\n---domain---\ntoolbox.scroll.pub\n\n---index.scroll---\nbuildHtml\nbaseUrl https://toolbox.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Web Developer's Toolbox\nstyle.css\nbody.html\nscript.js\n\n---body.html---\n
\n \n
\n\n
\n
\n

Hash Generator

\n
\n \n \n \n \n
\n
\n\n
\n

Port Scanner

\n
\n \n \n \n
\n
\n
\n\n
\n

Text Encoder

\n
\n \n \n \n \n \n
\n
\n
\n\n
\n

Built with passion by developers, for developers

\n
\n\n---style.css---\n:root {\n --primary-color: #2a6b9c;\n --secondary-color: #1d4e74;\n --background-color: #f5f7fa;\n --text-color: #333;\n --border-radius: 8px;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: system-ui, -apple-system, sans-serif;\n line-height: 1.6;\n color: var(--text-color);\n background: var(--background-color);\n}\n\nheader {\n background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));\n padding: 1rem;\n box-shadow: 0 2px 10px rgba(0,0,0,0.1);\n}\n\n.logo {\n font-size: 1.5rem;\n font-weight: bold;\n color: white;\n}\n\nnav {\n display: flex;\n justify-content: space-between;\n align-items: center;\n max-width: 1200px;\n margin: 0 auto;\n}\n\n.nav-links {\n display: flex;\n list-style: none;\n gap: 2rem;\n}\n\n.nav-links a {\n color: white;\n text-decoration: none;\n transition: opacity 0.3s;\n}\n\n.nav-links a:hover {\n opacity: 0.8;\n}\n\n.menu-toggle {\n display: none;\n background: none;\n border: none;\n color: white;\n font-size: 1.5rem;\n cursor: pointer;\n}\n\n.tool-section {\n max-width: 800px;\n margin: 2rem auto;\n padding: 2rem;\n background: white;\n border-radius: var(--border-radius);\n box-shadow: 0 4px 6px rgba(0,0,0,0.05);\n}\n\n.tool-container {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n\ntextarea, input[type=\"text\"] {\n padding: 0.8rem;\n border: 1px solid #ddd;\n border-radius: var(--border-radius);\n font-size: 1rem;\n}\n\nselect {\n padding: 0.8rem;\n border: 1px solid #ddd;\n border-radius: var(--border-radius);\n background: white;\n}\n\nbutton {\n padding: 0.8rem 1.5rem;\n background: var(--primary-color);\n color: white;\n border: none;\n border-radius: var(--border-radius);\n cursor: pointer;\n transition: background-color 0.3s;\n}\n\nbutton:hover {\n background: var(--secondary-color);\n}\n\n.results {\n margin-top: 1rem;\n padding: 1rem;\n background: #f8f9fa;\n border-radius: var(--border-radius);\n}\n\nfooter {\n text-align: center;\n padding: 2rem;\n background: var(--secondary-color);\n color: white;\n}\n\n@media (max-width: 768px) {\n .menu-toggle {\n display: block;\n }\n\n .nav-links {\n display: none;\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n background: var(--secondary-color);\n flex-direction: column;\n padding: 1rem;\n }\n\n .nav-links.active {\n display: flex;\n }\n\n .tool-section {\n margin: 1rem;\n padding: 1rem;\n }\n}\n\n---script.js---\n// Menu Toggle\ndocument.querySelector('.menu-toggle').addEventListener('click', () => {\n document.querySelector('.nav-links').classList.toggle('active');\n});\n\n// Hash Generator\nasync function generateHash() {\n const input = document.getElementById('hashInput').value;\n const hashType = document.getElementById('hashType').value;\n const encoder = new TextEncoder();\n const data = encoder.encode(input);\n \n try {\n let hash;\n switch(hashType) {\n case 'md5':\n // Note: Web Crypto API doesn't support MD5, this is a placeholder\n document.getElementById('hashOutput').value = 'MD5 not supported in Web Crypto API';\n return;\n case 'sha1':\n hash = await crypto.subtle.digest('SHA-1', data);\n break;\n case 'sha256':\n hash = await crypto.subtle.digest('SHA-256', data);\n break;\n }\n \n const hashArray = Array.from(new Uint8Array(hash));\n const hashHex = hashArray.map(b => b.toString(16).padStart(2, '0')).join('');\n document.getElementById('hashOutput').value = hashHex;\n } catch(error) {\n console.error('Hash generation failed:', error);\n }\n}\n\n// Port Scanner (Note: This is a mock implementation as browser-based port scanning is limited)\nfunction scanPorts() {\n const host = document.getElementById('hostInput').value;\n const portRange = document.getElementById('portRange').value;\n const results = document.getElementById('scanResults');\n \n results.innerHTML = 'Port scanning is limited in browser environment. Consider using a server-side implementation.';\n}\n\n// Text Encoder\nfunction encodeText() {\n const input = document.getElementById('encodeInput').value;\n const type = document.getElementById('encodeType').value;\n let output = '';\n \n switch(type) {\n case 'base64':\n output = btoa(input);\n break;\n case 'uri':\n output = encodeURIComponent(input);\n break;\n case 'hex':\n output = Array.from(input).map(c => c.charCodeAt(0).toString(16)).join('');\n break;\n }\n \n document.getElementById('encodeOutput').value = output;\n}\n\nfunction decodeText() {\n const input = document.getElementById('encodeInput').value;\n const type = document.getElementById('encodeType').value;\n let output = '';\n \n try {\n switch(type) {\n case 'base64':\n output = atob(input);\n break;\n case 'uri':\n output = decodeURIComponent(input);\n break;\n case 'hex':\n output = input.match(/.{1,2}/g)?.map(byte => String.fromCharCode(parseInt(byte, 16))).join('') || '';\n break;\n }\n \n document.getElementById('encodeOutput').value = output;\n } catch(error) {\n document.getElementById('encodeOutput').value = 'Invalid input for selected encoding';\n }\n}\n\n---end---"
+ }
+ ],
+ "stop_reason": "end_turn",
+ "stop_sequence": null,
+ "usage": {
+ "input_tokens": 296,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "output_tokens": 2467
+ }
+ }
readme.scroll
Changed around line 1
+ # toolbox.scroll.pub
+ Website generated by Claude from prompt: help me generate a creative website, make sure it contain many tools, such as MD5, hash, port scan and so on.
script.js
Changed around line 1
+ // Menu Toggle
+ document.querySelector('.menu-toggle').addEventListener('click', () => {
+ document.querySelector('.nav-links').classList.toggle('active');
+ });
+
+ // Hash Generator
+ async function generateHash() {
+ const input = document.getElementById('hashInput').value;
+ const hashType = document.getElementById('hashType').value;
+ const encoder = new TextEncoder();
+ const data = encoder.encode(input);
+
+ try {
+ let hash;
+ switch(hashType) {
+ case 'md5':
+ // Note: Web Crypto API doesn't support MD5, this is a placeholder
+ document.getElementById('hashOutput').value = 'MD5 not supported in Web Crypto API';
+ return;
+ case 'sha1':
+ hash = await crypto.subtle.digest('SHA-1', data);
+ break;
+ case 'sha256':
+ hash = await crypto.subtle.digest('SHA-256', data);
+ break;
+ }
+
+ const hashArray = Array.from(new Uint8Array(hash));
+ const hashHex = hashArray.map(b => b.toString(16).padStart(2, '0')).join('');
+ document.getElementById('hashOutput').value = hashHex;
+ } catch(error) {
+ console.error('Hash generation failed:', error);
+ }
+ }
+
+ // Port Scanner (Note: This is a mock implementation as browser-based port scanning is limited)
+ function scanPorts() {
+ const host = document.getElementById('hostInput').value;
+ const portRange = document.getElementById('portRange').value;
+ const results = document.getElementById('scanResults');
+
+ results.innerHTML = 'Port scanning is limited in browser environment. Consider using a server-side implementation.';
+ }
+
+ // Text Encoder
+ function encodeText() {
+ const input = document.getElementById('encodeInput').value;
+ const type = document.getElementById('encodeType').value;
+ let output = '';
+
+ switch(type) {
+ case 'base64':
+ output = btoa(input);
+ break;
+ case 'uri':
+ output = encodeURIComponent(input);
+ break;
+ case 'hex':
+ output = Array.from(input).map(c => c.charCodeAt(0).toString(16)).join('');
+ break;
+ }
+
+ document.getElementById('encodeOutput').value = output;
+ }
+
+ function decodeText() {
+ const input = document.getElementById('encodeInput').value;
+ const type = document.getElementById('encodeType').value;
+ let output = '';
+
+ try {
+ switch(type) {
+ case 'base64':
+ output = atob(input);
+ break;
+ case 'uri':
+ output = decodeURIComponent(input);
+ break;
+ case 'hex':
+ output = input.match(/.{1,2}/g)?.map(byte => String.fromCharCode(parseInt(byte, 16))).join('') || '';
+ break;
+ }
+
+ document.getElementById('encodeOutput').value = output;
+ } catch(error) {
+ document.getElementById('encodeOutput').value = 'Invalid input for selected encoding';
+ }
+ }
style.css
Changed around line 1
+ :root {
+ --primary-color: #2a6b9c;
+ --secondary-color: #1d4e74;
+ --background-color: #f5f7fa;
+ --text-color: #333;
+ --border-radius: 8px;
+ }
+
+ * {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+
+ body {
+ font-family: system-ui, -apple-system, sans-serif;
+ line-height: 1.6;
+ color: var(--text-color);
+ background: var(--background-color);
+ }
+
+ header {
+ background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
+ padding: 1rem;
+ box-shadow: 0 2px 10px rgba(0,0,0,0.1);
+ }
+
+ .logo {
+ font-size: 1.5rem;
+ font-weight: bold;
+ color: white;
+ }
+
+ nav {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ max-width: 1200px;
+ margin: 0 auto;
+ }
+
+ .nav-links {
+ display: flex;
+ list-style: none;
+ gap: 2rem;
+ }
+
+ .nav-links a {
+ color: white;
+ text-decoration: none;
+ transition: opacity 0.3s;
+ }
+
+ .nav-links a:hover {
+ opacity: 0.8;
+ }
+
+ .menu-toggle {
+ display: none;
+ background: none;
+ border: none;
+ color: white;
+ font-size: 1.5rem;
+ cursor: pointer;
+ }
+
+ .tool-section {
+ max-width: 800px;
+ margin: 2rem auto;
+ padding: 2rem;
+ background: white;
+ border-radius: var(--border-radius);
+ box-shadow: 0 4px 6px rgba(0,0,0,0.05);
+ }
+
+ .tool-container {
+ display: flex;
+ flex-direction: column;
+ gap: 1rem;
+ }
+
+ textarea, input[type="text"] {
+ padding: 0.8rem;
+ border: 1px solid #ddd;
+ border-radius: var(--border-radius);
+ font-size: 1rem;
+ }
+
+ select {
+ padding: 0.8rem;
+ border: 1px solid #ddd;
+ border-radius: var(--border-radius);
+ background: white;
+ }
+
+ button {
+ padding: 0.8rem 1.5rem;
+ background: var(--primary-color);
+ color: white;
+ border: none;
+ border-radius: var(--border-radius);
+ cursor: pointer;
+ transition: background-color 0.3s;
+ }
+
+ button:hover {
+ background: var(--secondary-color);
+ }
+
+ .results {
+ margin-top: 1rem;
+ padding: 1rem;
+ background: #f8f9fa;
+ border-radius: var(--border-radius);
+ }
+
+ footer {
+ text-align: center;
+ padding: 2rem;
+ background: var(--secondary-color);
+ color: white;
+ }
+
+ @media (max-width: 768px) {
+ .menu-toggle {
+ display: block;
+ }
+
+ .nav-links {
+ display: none;
+ position: absolute;
+ top: 100%;
+ left: 0;
+ right: 0;
+ background: var(--secondary-color);
+ flex-direction: column;
+ padding: 1rem;
+ }
+
+ .nav-links.active {
+ display: flex;
+ }
+
+ .tool-section {
+ margin: 1rem;
+ padding: 1rem;
+ }
+ }