您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Verify Waze landmarks linked to Google POI
当前为
// ==UserScript== // @name WME Google POI verifier // @name:cs WME Kontrola Google POI // @version 0.7.2b // @description Verify Waze landmarks linked to Google POI // @description:cs Kontroluje landmarky ve Waze nalinkované na Google POI // @author Kebb01 // @include https://editor-beta.waze.com/* // @namespace https://greasyfork.org/cs/scripts/19122-wme-google-poi-verifier // @grant none // ==/UserScript== function gpoi_bootstrap() { var bGreasemonkeyServiceDefined = false; try { if ("object" === typeof Components.interfaces.gmIGreasemonkeyService) { bGreasemonkeyServiceDefined = true; } } catch (err) { //Ignore. } if ( "undefined" === typeof unsafeWindow || ! bGreasemonkeyServiceDefined) { unsafeWindow = ( function () { var dummyElem = document.createElement('p'); dummyElem.setAttribute ('onclick', 'return window;'); return dummyElem.onclick (); } ) (); } /* begin running the code! */ console.log("GPOI: GPOI bootstrap init"); coolscript_init(); } // ========= function coolscript_init() { function gpoiFunc(){ function readTextFile(file, callback) { var rawFile = new XMLHttpRequest(); rawFile.overrideMimeType("text/plain"); rawFile.open("GET", file, true); rawFile.onreadystatechange = function() { if (rawFile.readyState === 4 && rawFile.status == "200") { callback(rawFile.responseText); } }; rawFile.send(null); } setInterval(function(){ gpoiRun(); }, 3000); function gpoiRun() { var gLoop = 0; var gUrlArray = []; var gCodeArray = []; var gpoiDataArray = []; var gLinkArray = []; var gpoiCount = document.getElementsByClassName("select2-chosen"); gpoiCount = gpoiCount.length; for (i = 0; i < gpoiCount; i++) { var gCode = document.getElementsByClassName("placeId")[i].innerHTML; gCodeArray.push(gCode); // kódy WME } for (x = 0; x < gpoiCount; x++) { var gpoiData = "https://editor-beta.waze.com/maps/api/place/details/json?placeid=" + gCodeArray[x] + "&key=AIzaSyBIfV0EMXrTDjrvD92QX5bBiyFmBbT-W8E"; gpoiDataArray.push(gpoiData); /// linky k json datům } for (y = 0; y < gpoiCount; y++) { readTextFile(gpoiDataArray[y], function(text){ var data = JSON.parse(text); var url = data.result.url; gUrlArray.push(url); for (y1 = 0; y1 < gpoiCount; y1++) { // var gLink = '<a href = "' + gUrlArray[y1] + '" target = "_blank">' + gCodeArray[y1] + '</a>'; var gLink = '<a href = "' + gUrlArray[y1] + '" target = "_blank">' + "» GoogleMap POI #" + [y1+1] + '</a>'; gLinkArray.push(gLink); } if (gpoiCount == 1) { for (z = 0; z < gpoiCount; z++) { document.getElementsByClassName("placeId")[z].innerHTML = gLinkArray[z]; } } if (gpoiCount > 1) { for (z = gpoiCount; z < gpoiCount+gpoiCount; z++) { document.getElementsByClassName("placeId")[z-gpoiCount].innerHTML = gLinkArray[z]; } } }); } } } gpoiFunc(); } // then at the end of your script, call the bootstrap to get things started gpoi_bootstrap();