Blooket KGui Loader

A loader for the Blooket Council's KGui

  1. // ==UserScript==
  2. // @name Blooket KGui Loader
  3. // @description A loader for the Blooket Council's KGui
  4. // @namespace https://github.com/c0des1ayr
  5. // @match *://*.blooket.com/play*
  6. // @exclude *://play.blooket.com/play*
  7. // @icon https://play.blooket.com/favicon.ico
  8. // @grant GM.xmlHttpRequest
  9. // @run-at document-start
  10. // @license MIT
  11. // @version 1.0.2
  12. // @author c0des1ayer
  13. // @connect cdn.jsdelivr.net
  14. // @antifeature This script loads the latest version of an external script using a CDN, which may potentially be malicious in the future.
  15. // ==/UserScript==
  16.  
  17. (async function() {
  18. 'use strict';
  19.  
  20. const scripts = [
  21. 'https://cdn.jsdelivr.net/gh/Blooket-Council/Blooket-Cheats@latest/cheats/KGui.js'
  22. ];
  23.  
  24. function fetchAndExecuteScript(url, callback) {
  25. GM.xmlHttpRequest({
  26. method: 'GET',
  27. url: url,
  28. onload: (response) => {
  29. if (response.status >= 200 && response.status < 300) {
  30. const scriptText = response.responseText;
  31. const script = document.createElement('script');
  32. script.textContent = scriptText;
  33. document.head.appendChild(script);
  34. console.log(`Successfully executed script from: ${url}`);
  35. callback && callback();
  36. } else {
  37. console.error(`Failed to load script: ${url}. Status: ${response.status}`);
  38. }
  39. },
  40. onerror: (err) => {
  41. console.error(`Error fetching script: ${url}`, err);
  42. }
  43. });
  44. }
  45.  
  46. function loadScriptsSequentially(urls) {
  47. if (urls.length === 0) return;
  48. const url = urls.shift();
  49. fetchAndExecuteScript(url, () => loadScriptsSequentially(urls));
  50. }
  51.  
  52. loadScriptsSequentially([...scripts]);
  53. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址