Skip to content

Instantly share code, notes, and snippets.

@amzyang
amzyang / e.penta
Created June 13, 2011 10:08
remove tabs quickly
js <<EOF
function removeTabs(count, arg) {
let end_pattern = /^[0-9]+$|^(\^|\$)$/;
if (!end_pattern.test(arg)) {
dactyl.echo("Invalid Range", commandline.FORCE_SINGLELINE)
return false;
}
let end = 0;
if (arg == "$")
@amzyang
amzyang / popupInspect.js
Created May 29, 2011 11:33
Shift+右键点击在Dom Inspector中查找弹出菜单元素
// popup.js -- js
// @Author: eric.zou (frederick.zou@gmail.com)
// @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
// @Created: Sun 29 May 2011 07:28:41 PM CST
// @Last Change: Sun 29 May 2011 07:31:43 PM CST
// @Revision: 4
// @Description:
// @Usage:
// @TODO:
// @CHANGES:
// ==UserScript==
// @name GoogleKingKong
// @namespace http://userstyles.org
// @description 改善 Google 的搜索结果界面,提高阅读效率
// @version 5.6
// @author SUCCESS
// @include http://www.google.*/search*
// @include http://www.google.*/*#*
// ==/UserScript==
/* 更新记录 ***********************************************************************
@amzyang
amzyang / editor.penta
Created May 8, 2011 09:09
custom editor
" Author: Yang Zou
" Email: frederick.zou@gmail.com
" Last Modified: Sun 08 May 2011 05:29:57 PM CST
" License: WTFPL
js <<EOF
var dynamicEditor = function() {
if (!options["editor"])
return;
let textBox = config.isComposeWindow ? null : dactyl.focusedElement;
var INFO =
<plugin name="findhere" version="0.0.1"
href="http://www.slimeden.com"
summary="Find from the start of current screen"
xmlns="http://vimperator.org/namespaces/liberator">
<author email="wuxiaoshan@gmail.com">Xiao Shan</author>
<license href="http://people.freebsd.org/~phk/">BEER-WARE</license>
<project name="Vimperator" minVersion="2.3"/>
<p>
This plugin makes inner find from the start of current screen.