您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Bootstrap library for custom Waze Map Editor scripts
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.gf.qytechs.cn/scripts/450160/1218867/WME-Bootstrap.js
This is a small Boostrap library for checking WME loading and providing useful events, which you can use for your scripts.
For what?
You can meet the realization of checking loading in the many scripts; it looks like this:
// 👎
function init() {
/* checking */
setTimeout(init, 200)
}
No need more this way; look at the following code:
// 👍
$(document).on('bootstrap.wme', () => { /* your code here */ } )
So I think it's clear.
Need more?
So, it is not all. This script trigger more events for common events in the WME where you can manipulate the arguments.
// @require https://gf.qytechs.cn/scripts/450160-wme-bootstrap/code/WME-Bootstrap.js
All following events are triggered on the document
bootstrap.wme
– when all WME-objects are ready for usagenone.wme
– when nothing chosennode.wme
– when chosen node for editnodes.wme
– when chosen more than one node (I'm not sure how it is possible)segment.wme
– when chosen segment for editsegments.wme
– when chosen more than one segmentvenue.wme
– when chosen place or point for editvenues.wme
– when chosen more than one place or pointpoint.wme
– when chosen point place for editplace.wme
– when chosen place for editresidential.wme
– when chosen residential place for editevent
– jQuery.Event
element
– HTMLElement
of the sidebar panel model
– W.model
models
– array of W.model
(function () {
'use strict'
$(document)
.on('bootstrap.wme', function () {
console.info('ready')
})
.on('none.wme', (e) => {
console.info('none')
})
.on('node.wme', (event, element, model) => {
console.info('node', model)
console.info('sidebar', element)
})
.on('nodes.wme', (event, element, models) => {
console.info('nodes', models)
})
.on('segment.wme', (event, element, model) => {
console.info('segment', model)
console.info('sidebar', element)
})
.on('segments.wme', (event, element, models) => {
console.info('segments', models)
})
.on('venue.wme', (event, element, model) => {
console.info('venue', model)
})
.on('venues.wme', (event, element, model) => {
console.info('venues', models)
})
.on('point.wme', (event, element, model) => {
console.info('point', model)
})
.on('place.wme', (event, element, model) => {
console.info('place', model)
})
.on('residential.wme', (event, element, model) => {
console.info('residential', model)
})
})();
Author homepage: http://anton.shevchuk.name/
Script homepage: https://github.com/AntonShevchuk/wme-bootstrap
GreasyFork: https://gf.qytechs.cn/en/scripts/450160-wme-bootstrap
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址