CCCA wiki

交通大學校園電腦社群策進會

使用者工具

網站工具


側欄

側邊欄

playground:test-bookmarklet-js

test bookmarklet in wiki

create a template for bookmarklet

alert.bookmarklet.js
alert('hello world!')

bookmarkletify

place bookmarklet javascript code inside <file javascript *.bookmarklet.js></file> downloadable_code_blocks and plugin:include this page as {{page>admin:bookmarkletify}} . then there will be a bookmarklet anchor show up below the downloadable file link.

this program will first find file end with *.bookmarklet.js . if nothing found, it will use the last found file.

the javascript in bookmarklet is not compressed, which may contain many space, therefor being large.

example

<file javascript example.bookmarklet.js>
alert('this is bookmarklet example')
</file>
 
{{page>admin:bookmarkletify}}

for renderred result, see test-bookmarklet-js .

code

2019/12/27 22:28 · gold holk

userscriptify

place user script javascript code inside <file javascript *.user.js></file> downloadable_code_blocks and plugin:include this page as {{page>admin:userscriptify}} . then there will be a user script anchor show up below the downloadable file link.

this program will first find file end with *.user.js . if nothing found, it will use the last file.

example

<file javascript example.user.js>
// ==UserScript==
// @match *://ccca.tw/*
// @grant none
// ==/UserScript==
alert('this is user script example')
</file>
 
{{page>admin:userscriptify}}

for renderred result, see test-bookmarklet-js .

code

2019/12/28 00:10 · gold holk
playground/test-bookmarklet-js.txt · 上一次變更: 2019/12/28 00:11 由 gold holk