您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Highlight parking lots without opening hours set
// ==UserScript== // @name WME Parking Lot Opening Hours Highlighter // @namespace tbrks // @version 0.0.1 // @description Highlight parking lots without opening hours set // @author tbrks // @include /^https:\/\/(www|beta)\.waze\.com\/(?!user\/)(.{2,6}\/)?editor\/?.*$/ // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; function highlightPlaces() { const places = W.model.venues.objects; for (const placeID in places) { if (places.hasOwnProperty(placeID)) { const place = places[placeID]; if (place.attributes.categories.includes('PARKING_LOT')) { if ( place.attributes.openingHours.length === 0 && place.attributes.categoryAttributes.PARKING_LOT.parkingType !== 'PRIVATE' ) { setStroke(place, 'blue'); } } } } } function setStroke(place, color) { const polygon = W.userscripts.getFeatureElementByDataModel(place); if (polygon) { polygon.setAttribute('stroke', color); } } function init() { const wazeMap = W.map; if (!wazeMap) { setTimeout(init, 1000); return; } wazeMap.events.register('moveend', null, highlightPlaces); wazeMap.events.register('zoomend', null, highlightPlaces); wazeMap.events.register('changelayer', null, highlightPlaces); console.log('[tbrks] place highlighter active') highlightPlaces(); } function waitForWaze() { if (typeof W !== 'undefined' && typeof W.model !== 'undefined' && typeof W.model.venues !== 'undefined') { init(); } else { setTimeout(waitForWaze, 1000); } } waitForWaze(); })();