Skip to content

Instantly share code, notes, and snippets.

var PLUGIN_INFO =
<KeySnailPlugin>
<name>ProgrammableGesture</name>
<version>0.2</version>
<include>main</include>
<license>The MIT License</license>
<minVersion>1.6.3</minVersion>
<description>ProgrammableGesture</description>
<description lang="ja">プログラマブルなマウスジェスチャ</description>
<author mail="nazoking@gmail.com" homepage="http://nazo.yi.org/">nazoking</author>
let PLUGIN_INFO =
<KeySnailPlugin>
<name>Encoding switcher</name>
<description>Switch current page encoding</description>
<description lang="ja">表示中のページのエンコードを切り替えます</description>
<updateURL>https://gist.github.com/958/1031072/raw/encoding-switcher.js</updateURL>
<version>0.0.3</version>
<license>MIT</license>
<minVersion>1.8.0</minVersion>
<include>main</include>
// ============================================================ //
// Inside of PRESERVE area.
// ============================================================ //
function transposeSubString(input, beg, end, to) {
let txt = input.value;
let head = txt.slice(0, beg);
let left = txt.slice(beg, end);
let right = txt.slice(end, to);