WME Bootstrap

Bootstrap library for custom Waze Map Editor scripts

目前為 2022-08-29 提交的版本,檢視 最新版本

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.cn-greasyfork.org/scripts/450160/1087270/WME%20Bootstrap.js

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
Anton Shevchuk
版本
0.0.7
建立日期
2022-08-25
更新日期
2022-08-29
尺寸
4.8 KB
授權條款
MIT

WME Bootstrap

Bootstrap library for custom WME scripts

Require Script

// @require https://greasyfork.org/scripts/450160-wme-bootstrap/code/WME-Bootstrap.js

Events

  • bootstrap.wme – on document, when all ready for usage
  • none.wme – on document, when nothing chosen
  • node.wme – on document, when chosen node for edit
  • nodes.wme – on document, when chosen more than one node (I'm not sure how it possible)
  • segment.wme – on document, when chosen segment for edit
  • segments.wme – on document, when chosen more than one segment
  • venue.wme – on document, when chosen place or point for edit
  • venues.wme – on document, when chosen more than one place or point
  • point.wme – on document, when chosen point place for edit
  • place.wme – on document, when chosen place for edit
  • residential.wme – on document, when chosen residential place for edit

Usage

(function () {
  'use strict'

  $(document)
    .on('bootstrap.wme', function () {
      console.info('@ready')
    })
    .on('none.wme', (e, el) => {
      console.info('@none', el)
    })
    .on('node.wme', (e, el) => {
      console.info('@node', el)
    })
    .on('nodes.wme', (e, el) => {
      console.info('@nodes', el)
    })
    .on('segment.wme', (e, el) => {
      console.info('@segment', el)
    })
    .on('segments.wme', (e, el) => {
      console.info('@segments', el)
    })
    .on('venue.wme', (e, el) => {
      console.info('@venue', el)
    })
    .on('venues.wme', (e, el) => {
      console.info('@venues', el)
    })
    .on('point.wme', (e, el) => {
      console.info('@point', el)
    })
    .on('place.wme', (e, el) => {
      console.info('@place', el)
    })
    .on('residential.wme', (e, el) => {
      console.info('@residential', el)
    })
})();

Links

Author homepage: http://anton.shevchuk.name/
Script homepage: https://github.com/AntonShevchuk/wme-bootstrap
GreasyFork: https://greasyfork.org/scripts/450160-wme-bootstrap/code/WME-Bootstrap.js