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 getToolbar() { | |
return document.getElementById('nav-bar') || | |
document.getElementById('mail-bar3') || // TB3 must be checked before TB2 | |
document.getElementById('mail-bar2') || // TB2 | |
document.getElementById('mail-bar'); | |
} |
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
// remove empty lines and multiple carriage return/newline | |
var lines = "1\r\n\n\n\n2\n3\n\n \n\n" | |
.replace(/^\s*$/mg, '') // remove empty lines | |
.replace(/[\r\n]+/g, '\n') // all carriage return/newline | |
.replace(/\n$/, '') // remove newline at end | |
.split('\n'); |
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
/** | |
* Author: Davide Ficano https://github.com/dafi | |
* Greader Auto Tagger from current entry title | |
* While you are on google reader press F2, the tag input box will open containing the | |
* current tags for current entry plus the title | |
*/ | |
javascript:window.addEventListener('keydown', function(event) { | |
// F2 key | |
var isValidKey = event.keyCode == 113; | |
if (!isValidKey) { |
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 miniUrlBlocker = { | |
// Lista delle regular expression contenenti le URL da bloccare | |
blackList : [/http:\/\/www\.badurl\.com/], | |
observe:function(subject, topic, data) { | |
if (topic != "http-on-modify-request") { | |
return; | |
} | |
try { | |
var httpChannel = subject.QueryInterface(Components.interfaces.nsIHttpChannel); |
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
javascript:(function(){var el=document.querySelector('.a-Eo-T');el.style.position='fixed';el.style.width='100%';})() |
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 n = document.querySelectorAll('a[href*=fileserve]'); | |
var s = ''; | |
for (var i = 0; i < n.length; i++) { | |
s += n[i].getAttribute('href') + '\n'; | |
} | |
var ta = document.createElement('textarea'); | |
ta.setAttribute('rows', '20'); | |
ta.setAttribute('cols', '100'); | |
ta.value = s; | |
document.body.appendChild(ta); |
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
// | |
// NSComparisonPredicate+HumanDescriptions.h | |
// VisualDiffer | |
// | |
// Created by davide ficano on 13/02/12. | |
// Copyright (c) 2012 visualdiffer.com. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
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
#import <Foundation/Foundation.h> | |
@interface RegExpUtils | |
/** | |
* Convert a glob string to a valid regular expression string | |
* strings like "*m" are converted to ".*m" | |
* Available on OSX 10.7 or above | |
*/ | |
+ (NSString*)convertGlobMetaCharsToRegexpMetaChars:(NSString*)glob; |
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
// ==UserScript== | |
// @name gplus | |
// @namespace http://dafi.plus | |
// @include plus.google.com | |
// @version 1 | |
// ==/UserScript== | |
[].forEach.call(document.querySelectorAll('div.jn.gu'), function(e) { | |
var text = e.firstChild | |
&& e.firstChild.textContent.toLowerCase(); | |
if (text && (text.indexOf('terremot') != -1)) { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Menu Key Bindings</key> | |
<dict> | |
<key>Key Bindings</key> | |
<array> | |
<dict> | |
<key>Action</key> |
OlderNewer