您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
座標を事前に設定してWazeエディターを開くボタンをウェブページに追加します。
// ==UserScript== // @name 交通規制マップ→Wazeエディター // @namespace https://example.com/ // @version 1.2 // @description 座標を事前に設定してWazeエディターを開くボタンをウェブページに追加します。 // @match http://hotmist.ddo.jp/* // @grant none // ==/UserScript== (function() { 'use strict'; // URLから緯度と経度を取得 var coords = window.location.href.split("@")[1].split(","); var lat = coords[0]; var lon = coords[1]; // 縮尺を固定したWazeエディターURLを作成 var wazeEditorUrl = "https://www.waze.com/ja/editor?env=row&lon=" + lon + "&lat=" + lat + "&zoom=7"; // 希望の縮尺に変更 // 座標を事前に設定してWazeエディターを開くボタンを作成 var wazeButton = '<a href="' + wazeEditorUrl + '" target="_blank" style="position: fixed; left: 10px; bottom: 10px;"><button>Wazeエディターで開く</button></a>'; document.body.insertAdjacentHTML('beforeend', wazeButton); // ページをリロードするボタンを作成 var reloadButton = '<button id="reloadButton" style="position: fixed; left: calc(10px + 200px); bottom: 10px;">ページをリロード</button>'; document.body.insertAdjacentHTML('beforeend', reloadButton); // リロードボタンのクリックイベントを設定 document.getElementById('reloadButton').addEventListener('click', function() { location.reload(); }); })();