您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
모바일에서 개발자도구를 열 수 있게 합니다.
当前为
- // ==UserScript==
- // @name Devtool mobile
- // @version 1.3
- // @description 모바일에서 개발자도구를 열 수 있게 합니다.
- // @author ㅇㅇ
- // @license MIT
- // @match *://*/*
- // @grant none
- // @namespace https://greasyfork.org/users/1426529
- // ==/UserScript==
- (function () {
- 'use strict';
- var erudaLoaded = false;
- var erudaScript = null;
- var touchCount = 0;
- var touchTimer = null;
- function loadEruda() {
- if (!erudaLoaded) {
- erudaScript = document.createElement('script');
- erudaScript.src = "//cdn.jsdelivr.net/npm/eruda";
- document.body.appendChild(erudaScript);
- erudaScript.onload = function () {
- eruda.init();
- eruda.show();
- erudaLoaded = true;
- localStorage.setItem('erudaLoaded', 'true');
- };
- }
- }
- function unloadEruda() {
- if (erudaLoaded) {
- eruda.destroy();
- document.body.removeChild(erudaScript);
- erudaScript = null;
- erudaLoaded = false;
- localStorage.setItem('erudaLoaded', 'false');
- }
- }
- document.addEventListener('touchstart', function (e) {
- if (e.touches.length === 2) { // 두 손가락 터치 감지
- touchCount++;
- if (touchTimer) {
- clearTimeout(touchTimer);
- }
- touchTimer = setTimeout(function () {
- touchCount = 0; // 300ms 이후 터치 카운트 초기화
- }, 300);
- if (touchCount === 3) { // 3번 터치 시 동작
- erudaLoaded ? unloadEruda() : loadEruda();
- touchCount = 0;
- }
- }
- });
- document.addEventListener('keydown', function (e) {
- if (e.ctrlKey && e.shiftKey && e.key === 'R') {
- erudaLoaded ? unloadEruda() : loadEruda();
- }
- });
- if (localStorage.getItem('erudaLoaded') === 'true') {
- loadEruda();
- }
- })();