您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
4/4/2020 14:41:03
当前为
- // ==UserScript==
- // @name Link OSM changesets to achavi
- // @namespace Violentmonkey Scripts
- // @match https://www.openstreetmap.org/user/*/history
- // @grant none
- // @version 1.0
- // @author Swyter
- // @run-dat document-start
- // @description 4/4/2020 14:41:03
- // ==/UserScript==
- // Create an observer instance linked to the callback function
- new MutationObserver(function(mutationsList, observer)
- {
- for(var mutation of mutationsList) {
- if (mutation.type == 'childList') {
- console.log('watch paragraph has changed or child has been added/removed', mutation);
- }
- }
- for (var elem of document.querySelectorAll('div.changesets div.details'))
- elem.innerHTML = elem.innerHTML.replace(/#(\d+)/g, `#<a title='View revision $1 on achavi.' href=https://nrenner.github.io/achavi/?changeset=$1>$1</a>`)
- }).observe(document.querySelector('div.changesets'), { childList: true });