This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
name: 'test favicon', | |
preview: function(pb){ | |
const FS = (Cc['@mozilla.org/browser/favicon-service;1'] | |
.getService(Ci.nsIFaviconService)); | |
var uri = Utils.uri(CmdUtils.document.URL); | |
try { var faviconUri = FS.getFaviconForPage(uri) } catch([]) {} | |
var dataUrl = faviconUri && FS.getFaviconDataAsDataURL(faviconUri); | |
pb.innerHTML = <><img src={dataUrl}/><br/>{dataUrl}</>; | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- waker.rb~ 2010-07-25 06:03:36.070000000 +0900 | |
+++ waker.rb 2010-07-25 06:04:12.774000000 +0900 | |
@@ -105,7 +105,7 @@ | |
num_actions += actions.size | |
reg = begin | |
- Regexp.new('\\A(?:' + regexp + ')\\Z', Regexp::MULTILINE) | |
+ Regexp.new('\\A(?:' + regexp + ')\\z', Regexp::MULTILINE) | |
rescue | |
error("Regexp error: #{$!.to_s} \"#{regexp}\" in line #{lineno}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun enclose-sexp-or-selection (ncls) | |
(interactive "sEnclosure (split with #\\RET): ") | |
(if (equal ncls "") (setq ncls "()")) | |
(let ((type (get-selection-type)) | |
ps bg nd mp pp bp) | |
(if (setq ps (position #\RET ncls)) | |
(setf bg (substring ncls 0 ps) | |
nd (substring ncls (1+ ps))) | |
(setf ps (ceiling (/ (length ncls) 2)) | |
bg (substring ncls 0 ps) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name alnumpop | |
// @desc Provides sequential accesskeys to History/AllTabs popup. | |
// @compat Fx4+ | |
// @author satyr | |
// @include main | |
// ==/UserScript== | |
[ document.getElementById('backForwardMenu') | |
, document.getElementById('alltabs-popup') | |
].forEach |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function StickamLargeChat_old (id) { | |
var start = "<object width='820' height='490' codebase='http:\/\/fpdownload.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=8,0,0,0' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'>\n" + | |
"<embed src='http:\/\/player.stickam.com\/flash\/stickam\/stickam_player.swf?app=stickam_chat_open.swf&userID="; | |
var end="' width='820' height='490' type='application/x-shockwave-flash' quality='high' allowscriptaccess='always' allowfullscreen='true' flashvars='webID=84634C6CDD408CA62D5DBD086DF5E196&webSeq=&userType=205&skinName=open&app=stickam_chat_open.swf&userIP=127.0.0.1&skinType=open&sessionType=115&userSiteID=1015547&autoplay=1&playerID=7334381&langID=en&'>\n" + | |
"<\/embed><\/object>"; | |
return (start+id+end); | |
} | |
function StickamLargeChat(id){ | |
var start = "<object width='320' height='240' codebase='http:\/\/fpdownload.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=8,0,0,0' classid='clsid:D27CDB6E-AE6D-11cf-96B8-4445535 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC | |
"-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>XHTML test</title> | |
<script type="text/javascript" src="BespinEmbedded.js"></script> | |
</head> | |
<body> | |
<textarea class="bespin" style="width:480px;height:320px">XHTML!</textarea> | |
</body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun buffer-directory (&optional buf (selected-buffer)) | |
(let ((name (get-buffer-file-name buf))) | |
(and name (directory-namestring name)))) | |
(defun close-buffers-within (&optional (dir (buffer-directory))) | |
(interactive) | |
(when dir | |
(let ((re (concat "^" (regexp-quote dir))) | |
(closed '())) | |
(dolist (buf (buffer-list)) | |
(when (string-match re (or (buffer-directory buf) "")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document | |
url-prefix(https://twitter.com/oauth/authenticate?), | |
url-prefix(https://twitter.com/oauth/authorize?), | |
url-prefix(https://api.twitter.com/oauth/authenticate?), | |
url-prefix(https://api.twitter.com/oauth/authorize?), | |
url-prefix(http://twitter.com/oauth/authenticate?), | |
url-prefix(http://twitter.com/oauth/authorize?), | |
url-prefix(http://api.twitter.com/oauth/authenticate?), | |
url-prefix(http://api.twitter.com/oauth/authorize?) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name pythonchallenge linkedlist | |
// @namespace http://twitter.com/m_satyr | |
// @include http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=* | |
// ==/UserScript== | |
addEventListener('DOMContentLoaded', function(){ | |
var [,next] = /next nothing is (\d+)/(document.body.textContent); | |
if(next) location.href = location.href.replace(/\d+/, next); | |
}, false); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Halt Alert | |
// @description Provides ways to escape loop-y modal dialogs. | |
// @include chrome://global/content/commonDialog.xul | |
// @compat 3.5+ | |
// @author satyr | |
// @license X | |
// ==/UserScript== | |
setTimeout(function HA_setup(){ | |
var box = document.documentElement.appendChild(lmn('hbox')); |