🏠 Home 

Scratch Bioとアイコン内容変更

ScratchのユーザーのBio内容とアイコンを変更するスクリプト


Install this script?
  1. // ==UserScript==
  2. // @name Scratch Bioとアイコン内容変更
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description ScratchのユーザーのBio内容とアイコンを変更するスクリプト
  6. // @author You
  7. // @match https://scratch.mit.edu/*
  8. // @grant none
  9. // @license    MIT
  10. // ==/UserScript==
  11. (function() {
  12. 'use strict';
  13. const newIconUrl = 'https://uploads.scratch.mit.edu/get_image/user/140087119_110x110.png';
  14. // BioとアイコンのURLを変更する関数
  15. const changeBioAndIcons = () => {
  16. // Bioの変更
  17. const bios = document.querySelectorAll('#bio-readonly .viewport .overview');
  18. bios.forEach(bio => {
  19. bio.textContent = '@Toyota1337 wuz here https://scratch.mit.edu/users/Toyota1337/';
  20. });
  21. // アイコンのURL変更
  22. const icons = document.querySelectorAll('img[src*="scratch.mit.edu/get_image/user"]');
  23. icons.forEach(icon => {
  24. icon.src = newIconUrl;
  25. });
  26. };
  27. // 初回適用
  28. changeBioAndIcons();
  29. // DOMの変化を監視して、Bioとアイコンが追加された場合に変更を適用
  30. const observer = new MutationObserver(changeBioAndIcons);
  31. // 設定: DOMの変更を監視(子ノードの追加)
  32. observer.observe(document.body, { childList: true, subtree: true });
  33. })();