This file contains 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
var xul = { | |
$tagName: "menupopup", | |
$xmlns: "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", | |
$property: { toString: function() { return "[Object RawProperty]"; } }, | |
$oncommand: function(e) { | |
alert(e.target.getAttribute("value")); | |
}, | |
oncommand: "this.oncommand(event);", | |
$childNodes: [ | |
{ $tagName: "menuitem", label: "Item - 0", value: "0" }, |
This file contains 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
gBrowser.tabContainer.advanceSelectedTab(1 /* 1 or -1 */, true); | |
if("TreeStyleTabService" in window) { | |
const ns = "__mouseGesturesTabsSwitcher__"; | |
var autoExpandDelay = ( | |
"TreeStyleTabUtils" in window | |
? TreeStyleTabUtils | |
: TreeStyleTabService | |
).getTreePref("autoExpandSubtreeOnSelect.whileFocusMovingByShortcut.delay") || 800; | |
var ts = ns in window && window[ns]; | |
if(!ts) { |
This file contains 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 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru"> | |
<!-- Saved from URL: http://govnokod.ru/11690 | |
Date: 2012-09-01 13:46:47 UTC --> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Говнокод #11690 — JavaScript — Говнокод.ру</title> | |
<meta name="keywords" content="говнокод, смешной код, быдлокод, быдлокодеры, индусы, для программистов, про программистов, индусский код, записки программиста, говно, говнокод на php, mysql, perl"> | |
<meta name="description" content="Моя реализация обработки смайликов из VK. Это потом уже голова стала соображать и всё заменилось регуляркой с функцией."> | |
<meta property="og:image" content="http://govnokod.ru/images/brand.gif"> |
This file contains 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
// http://custombuttons.sf.net/forum/viewtopic.php?p=2905#p2905 | |
// (c) Infocatcher 2012 | |
// version 0.1.0 - 2012-12-20 | |
// Repair Custom Buttons after save in Nightly with javascript.options.xml.chrome = false | |
// Use at your own risk! | |
// Backup your %profile%/custombuttons directory first! | |
Components.utils.import("resource://gre/modules/NetUtil.jsm"); | |
Components.utils.import("resource://gre/modules/FileUtils.jsm"); |
This file contains 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
sync(f); | |
function sync(f) { | |
var g = f.__generator = f(); | |
g.next(); | |
} | |
function f() { | |
var res; | |
_log("Start first async..."); | |
setTimeout(function() { |
This file contains 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
addEventListener("TabClose", function(e) { | |
function isNewTabURL(url) { | |
// See chrome://browser/content/utilityOverlay.js | |
return url == (window.BROWSER_NEW_TAB_URL || "about:newtab"); | |
} | |
var tab = e.target; | |
var browser = tab.linkedBrowser; | |
if(!isNewTabURL(browser.currentURI.spec)) | |
return; | |
var sh = browser.sessionHistory; |
This file contains 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
// Choose & insert/change color in RGB-format by standard color selection dialog | |
// supported short format of standard colors | |
// http://akelpad.sourceforge.net/forum/viewtopic.php?p=8611#8611 | |
// http://outstanding.hmarka.net/akelpad/scripts/ChooseColor.js | |
// https://gist.github.com/Infocatcher/4632145 | |
// Version: 1.8.1 (2013.08.26) Infocatcher (support for short color format like "#f80") | |
// Version: 1.8 (2013.01.25) Infocatcher (support for color names like "silver") | |
// Version: 1.7.1 (2012.09.14) VladSh (warning fixes by Lint) | |
// Version: 1.7 (2012.09.13) VladSh (bug fixes, added/changed variation of formats of input/output data) | |
// Version: 1.6.1 (2011.02.16) se7h (autoselect color under caret) |
This file contains 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 dndTest(e) { | |
var dt = e.dataTransfer; | |
setTimeout(function() { | |
var types = dt.types; | |
var c = dt.mozItemCount; | |
var r = []; | |
for(var i = 0, li = types.length; i < li; ++i) { | |
var type = types.item(i); | |
r.push(i + ": " + type); | |
for(var j = 0; j < c; ++j) { |
This file contains 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
var TU_hookCode = TU_hookMethod; | |
function TU_hookMethod(aStr) { | |
try { | |
var namespaces = aStr.split("."); | |
try { | |
var object = this; | |
while (namespaces.length > 1) { | |
object = object[namespaces.shift()]; | |
} |
OlderNewer