container card code btn btn.alt
Goonee Guide

คู่มือสั้น: Goonee Console

คู่มือนี้มี 4 ส่วน: 1) Bookmarklet 2) Userscript 3) Extension 4) Eruda • เน้นใช้ console.js เป็นหลัก

🧪 ทดสอบเรียกเครื่องมือบนหน้านี้

เลือกว่าจะโหลดจากไฟล์ในเครื่อง (รีโปนี้) หรือจากโปรเจกต์ที่ Deploy อยู่

• Deploy: https://goonee.netlify.app/console.js
• Local: ../console.js

1) Bookmarklet

คัดลอกโค้ดไปสร้างปุ่มลัด แล้วกดบนหน้าเว็บที่ต้องใช้เครื่องมือ

• Goonee Console (หลัก)

javascript:(function(){var s=document.createElement('script');s.src='https://goonee.netlify.app/console.js?t='+Date.now();s.onload=function(){try{toggleConsole&&toggleConsole();}catch(e){}};document.body.appendChild(s);})();

คัดลอกโค้ด เปิดไฟล์ console.js

• Loader (โหลดชุดเครื่องมือ)

javascript:(function(){var s=document.createElement('script');s.src='https://goonee.netlify.app/loader.js?t='+Date.now();document.body.appendChild(s);})();

คัดลอกโค้ด เปิดไฟล์ loader.js

• ตัวอย่าง Bookmarklet ชี้ไปไฟล์เครื่องมือ (สั้น)

javascript:(function(){var s=document.createElement('script');s.src='https://goonee.netlify.app/sharktool/monitor.js';document.body.appendChild(s)})();
javascript:(function(){var s=document.createElement('script');s.src='https://goonee.netlify.app/sharktool/Theme.js';document.body.appendChild(s)})();

หมายเหตุ: บางเว็บอาจบล็อกสคริปต์ภายนอก (CSP) ให้ใช้ Extension หรือ Userscript แทน

1.1) Bookmarklet สำหรับเครื่องมือในโฟลเดอร์ sharktool/

คัดลอกโค้ดสำหรับเครื่องมือที่ต้องการใช้งาน

• Monitor

javascript:(function(){var s=document.createElement('script');s.src='https://goonee.netlify.app/sharktool/monitor.js?t='+Date.now();document.body.appendChild(s)})();

คัดลอกโค้ด เปิดไฟล์

• Theme

javascript:(function(){var s=document.createElement('script');s.src='https://goonee.netlify.app/sharktool/Theme.js?t='+Date.now();document.body.appendChild(s)})();

คัดลอกโค้ด เปิดไฟล์

• Snipers

javascript:(function(){var s=document.createElement('script');s.src='https://goonee.netlify.app/sharktool/snipers.js?t='+Date.now();document.body.appendChild(s)})();

คัดลอกโค้ด เปิดไฟล์

• BurpShark

javascript:(function(){var s=document.createElement('script');s.src='https://goonee.netlify.app/sharktool/burpshark.js?t='+Date.now();document.body.appendChild(s)})();

คัดลอกโค้ด เปิดไฟล์

• SharkScan

javascript:(function(){var s=document.createElement('script');s.src='https://goonee.netlify.app/sharktool/sharkscan.js?t='+Date.now();document.body.appendChild(s)})();

คัดลอกโค้ด เปิดไฟล์

• PostShark

javascript:(function(){var s=document.createElement('script');s.src='https://goonee.netlify.app/sharktool/postshark.js?t='+Date.now();document.body.appendChild(s)})();

คัดลอกโค้ด เปิดไฟล์

• DelDis

javascript:(function(){var s=document.createElement('script');s.src='https://goonee.netlify.app/sharktool/deldis.js?t='+Date.now();document.body.appendChild(s)})();

คัดลอกโค้ด เปิดไฟล์

• Tool (ตัวจัดการเครื่องมือ)

javascript:(function(){var s=document.createElement('script');s.src='https://goonee.netlify.app/sharktool/tool.js?t='+Date.now();document.body.appendChild(s)})();

คัดลอกโค้ด เปิดไฟล์

• BM (รวมคำสั่งลัด)

javascript:(function(){var s=document.createElement('script');s.src='https://goonee.netlify.app/sharktool/BM.js?t='+Date.now();document.body.appendChild(s)})();

คัดลอกโค้ด เปิดไฟล์

• BM-postshark (ชุดปุ่มลัดสำหรับ PostShark)

javascript:(function(){var s=document.createElement('script');s.src='https://goonee.netlify.app/sharktool/BM-postshark.js?t='+Date.now();document.body.appendChild(s)})();

คัดลอกโค้ด เปิดไฟล์

ปล. ไฟล์ sharksnipers.js ปัจจุบันว่างเปล่า จึงยังไม่สร้าง Bookmarklet ให้

2) Userscript (Tampermonkey/Violentmonkey)

คัดลอกสคริปต์นี้ไปวาง

  1. มือถือ Android (แนะนำ Kiwi Browser) ลงปลั๊กอินจาก Chrome Web Store หรือ Edge
// ==UserScript==
// @name         SharkTool Console Toggle (Floating Button)
// @namespace    sharktool
// @version      1.0.0
// @description  Floating button to toggle the SharkTool console loaded from your Netlify
// @match        *://*/*
// @grant        GM_addStyle
// @run-at       document-end
// ==/UserScript==
(function(){
  'use strict';
  const SCRIPT_URL = 'https://goonee.netlify.app/console.js'; // ← เปลี่ยนเป็นไฟล์ของคุณ
  // ตั้ง URL ของ Eruda เองได้ (ถ้าจะใช้)
  window.ERUDA_URL = 'https://cdn.jsdelivr.net/npm/eruda@3/eruda.min.js';

  if (window.__shark_console_btn) return;

  function addStyle(css){
    try{ if (typeof GM_addStyle==='function'){ GM_addStyle(css); return; } }catch(_){ }
    const s=document.createElement('style'); s.textContent=css; document.head.appendChild(s);
  }

  addStyle(`
    #__shark_toggle_btn{position:fixed;right:16px;bottom:16px;width:48px;height:48px;border-radius:50%;
      background:#00ff41;color:#062;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700;
      box-shadow:0 6px 18px rgba(0,0,0,.35),0 0 0 2px #00ff41 inset;cursor:pointer;user-select:none;z-index:2147483647;
      transition:transform .12s ease, box-shadow .12s ease;touch-action:none}
    #__shark_toggle_btn:hover{ transform: translateY(-1px); box-shadow:0 8px 22px rgba(0,0,0,.45),0 0 0 2px #00ff41 inset; }
    #__shark_toggle_btn.__loading{ background:#ccc;color:#333;box-shadow:0 0 0 2px #bbb inset }
  `);

  function ensureConsoleLoaded(){
    return new Promise((resolve, reject)=>{
      if (window.toggleConsole){ resolve(undefined); return; }
      const id='__shark_console_loader';
      if (document.getElementById(id)){
        const chk=setInterval(()=>{ if(window.toggleConsole){ clearInterval(chk); resolve(undefined);} },80);
        setTimeout(()=>{ clearInterval(chk); window.toggleConsole?resolve(undefined):reject(new Error('Timeout')); },10000);
        return;
      }
      const s=document.createElement('script'); s.id=id; s.src=SCRIPT_URL; s.async=true;
      s.onload=()=> resolve(undefined);
      s.onerror=()=> reject(new Error('Failed to load console.js'));
      document.documentElement.appendChild(s);
    });
  }

  function createButton(){
    const btn=document.createElement('div');
    btn.id='__shark_toggle_btn';
    btn.title='SharkTool Console';
    btn.textContent='≡';
    btn.addEventListener('click', async ()=>{
      btn.classList.add('__loading');
      try{ await ensureConsoleLoaded(); window.toggleConsole(); }
      catch(err){ console.error('[SharkTool] load error:',err); alert('Cannot load console.js'); }
      finally{ btn.classList.remove('__loading'); }
    });
    document.body.appendChild(btn);
    window.__shark_console_btn = btn;
  }

  createButton();
})();

คัดลอก Userscript

หมายเหตุ: ถ้าเว็บไซต์มี CSP เข้มงวด อาจบล็อกการโหลดสคริปต์จากโดเมนภายนอก ให้โฮสต์ไฟล์ไว้บนโดเมนที่ได้รับอนุญาต หรือใช้ @require ของ Userscript แทน

3) Extension

4) Eruda

กดปุ่ม 🧪 Eruda ในคอนโซลของ Goonee เพื่อโหลด/แสดง/ซ่อน

หรือ Bookmarklet สำหรับ Eruda โดยตรง

javascript:(function(){var s=document.createElement('script');s.src='https://cdn.jsdelivr.net/npm/eruda@3/eruda.min.js';s.onload=function(){eruda.init();eruda.show();};document.body.appendChild(s)})();

พื้นที่คัดลอก Bookmarklet (Goonee Console)

javascript:(function(){var s=document.createElement('script');s.src='https://goonee.netlify.app/console.js?t='+Date.now();s.onload=function(){try{toggleConsole&&toggleConsole();}catch(e){}};document.body.appendChild(s);})();

คัดลอกโค้ด

← กลับหน้า Home