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 Inventário do brute | |
// @namespace La e My Brute | |
// @description Adiciona a opção de visualizar o inventário do adversário na arena | |
// @include http://*.labrute.com/arene | |
// @include http://*.mybrute.com/arene | |
// ==/UserScript== | |
// Add jQuery | |
var GM_JQ = document.createElement('script'); |
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
// jQuery('#myId').scrollToMe(); | |
jQuery.fn.scrollToMe = function(speed,callFunc) { | |
var that = this; | |
setTimeout(function() { | |
var targetOffset = that.offset().top-10; | |
$('html,body').eq(0).animate({scrollTop: targetOffset}, speed || 500, callFunc); | |
},500); | |
return this; | |
}; |
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
#!/bin/bash | |
## script to connect to indecent webdav implementations using wdfs | |
## on macosx with macfuse | |
## user config | |
user="o_seu" | |
pass="aprils_fools" | |
mount_to="/Remote/" |
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 addEvent(el, type, fn) { | |
el.addEventListener(type, fn, false); | |
return function (type, fn) { | |
return addEvent(el, type, fn); | |
}; | |
} | |
// So I can do this: | |
addEvent(document.getElementsByTagName('img')[0], 'dragend', logEvent)('dragstart', logEvent); |
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
// Some simple functions to find elements. | |
var id = function(id){return document.getElementById(id)}, | |
tag = function(tag,scope){return (scope||document).getElementsByTagName(tag)}, | |
hasClass = function(find,nodes) { | |
var ret = [],node,i; for(i=0;i<nodes.length;i++) { node = nodes[i]; | |
if(1+node.className.indexOf(find)) { ret.push(node);} | |
} return ret; | |
}; | |
// usage |
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
// markup: | |
// <div class="container"> | |
// <div class="inner"></div> | |
// </div> | |
// caso que você já tem div.container e quer pegar todos os div.inner | |
$('div.container').find('div.inner').each(function(){ | |
$(this) // cada iteração vai passar por uma div.inner | |
}); |
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
// handle filters with only one event | |
$('#filters').delegate(':radio','change', function(){ | |
var active = $('#filters :radio:checked').val(); | |
$('#stickers') | |
.removeClass() | |
.addClass('filter-'+active); | |
}); |
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
/* | |
* Copyright (c) 2010 Tobias Schneider | |
* This script is freely distributable under the terms of the MIT license. | |
*/ | |
(function(){ | |
var UPC_SET = { | |
"3211": '0', | |
"2221": '1', | |
"2122": '2', |
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
<script type="text/javascript"> | |
(function(){ | |
// Fix IE problem with many span inside an <a> and fix hovering | |
if(document.body.attachEvent){ | |
function findLink(elm) { | |
if(elm.nodeName.toLowerCase() == "a") { | |
return elm; | |
} else { | |
return findLink(elm.parentNode); | |
} |
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
/* The Magnificent CLEARFIX: Updated to prevent margin-collapsing on child elements << j.mp/bestclearfix */ | |
/* Fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin-padding-bottom-of-page */ | |
/* Note: It's better to use display:inline-block; if width is set on the element you want to clear */ | |
.clearfix:before, .clearfix:after { | |
content: "\0020"; display: block; height: 0; visibility: hidden; | |
} | |
.clearfix:after { clear: both; } | |
.clearfix { zoom: 1; } |
OlderNewer