Skip to content

Instantly share code, notes, and snippets.

View tzi's full-sized avatar
👨‍🎓
enseigner les CSS

Thomas ZILLIOX tzi

👨‍🎓
enseigner les CSS
View GitHub Profile
@tzi
tzi / quick_rapidshare.js
Created February 15, 2012 19:36
A #javascript #bookmarklet : Automatically launch download on #RapidShare
(function() {
// Instanciate a generic bookmarklet popin
var popin = new bm_popin( 1838395 );
popin.title( 'Quick RapidShare' );
// Inspect if timer is finish
var interval_id;
var inspect_rapidshare_timer = function() {
var rapidshare_timer = document.querySelector('#js_dlpage_freetimer_container');
@tzi
tzi / bm_popin.js
Created February 15, 2012 21:21
A #javascript #bookmarklet : Provide a generic #popin for other bookmarklets
function bm_popin( id ) {
this.id = id;
this.construct = function() {
var bm = document.querySelector( '#bm_popin' );
if ( bm == null ) {
bm = document.createElement( 'div' );
bm.setAttribute( 'id', 'bm_popin' );
bm.setAttribute( 'style', 'position: fixed; bottom:10px; right: 10px; z-index: 9999; width: 200px; font-size: 12px; line-height: 16px; font-weight: normal; color: #EEEEEE; text-align: left;' );
document.body.appendChild( bm );
}
@tzi
tzi / HappyEzPublish.user.js
Created February 17, 2012 20:58
A #javascript #userscript : Add some happyness to your #ezpublish Back-Office
// ==UserScript==
// @name HappyEzPublish
// @description Add some happyness to eZ Publish Back-Office
// @id me.zilliox.HappyEzPublish
// @homepageURL http://userscripts.org/scripts/show/120420
// @supportURL http://userscripts.org/scripts/discuss/120420
// @updateURL http://userscripts.org/scripts/source/120420.meta.js
// @version 2012.02.18
// @author tzilliox
// @namespace http://zilliox.me
@tzi
tzi / bonzo_create.js
Created February 21, 2012 18:40
A #javaScript #function : Create HTML element inspired by #Bonzo
bonzo_create = function (node) {
return typeof node == 'string' && node !== '' ?
function () {
// Add context values
var win = window
, doc = win.document
, html = doc.documentElement
, parentNode = 'parentNode'
, query = null
@tzi
tzi / GistBlocksLink.user.js
Created February 22, 2012 02:55
A #javascript #userscript : Add a #bl.ocks.org link on #Gist
@tzi
tzi / GistBetterEdition.user.js
Created February 22, 2012 16:14
A #javascript #userscript : Improve the #github #gist edition view : Allow to use Tab, Shift+Tab & Ctrl+D
// ==UserScript==
// @name GistBetterEdition
// @description Improve the Gist edition view : Allow indentation & Enlarge
// @id me.zilliox.GistBetterEdition
// @homepageURL http://userscripts.org/scripts/show/126461
// @supportURL http://userscripts.org/scripts/discuss/126461
// @updateURL http://userscripts.org/scripts/source/126461.meta.js
// @version 2012.07.12
// @author tzilliox
// @namespace http://zilliox.me
@tzi
tzi / myAnchor.js
Created February 23, 2012 13:11
A #javascript #bookmarklet : Find the nearest anchor from your click
(function() {
// Attributes
var reg = new RegExp( '" id="([^"]*)"', 'g' ),
popin = new bm_popin( 1892731 );
popin.title( 'myAnchor' );
popin.text( 'Click on your page' );
// Recursive function
function get_previous_node_id( node, parse ) {
@tzi
tzi / GistFilterTag.user.js
Created February 23, 2012 17:55
A #javascript #userscript : Allow you to filter yours #gist by tag
// ==UserScript==
// @name GistFilterTag
// @description Allow you to filter yours gist by tag
// @id me.zilliox.GistFilterTag
// @homepageURL http://userscripts.org/scripts/show/126558
// @supportURL http://userscripts.org/scripts/discuss/126558
// @updateURL http://userscripts.org/scripts/source/126558.meta.js
// @version 2012.02.24
// @author tzilliox
// @namespace http://zilliox.me
@tzi
tzi / estimation.css
Created February 28, 2012 18:09
A #javascript page to make easily #estimation
.container {
width: 960px;
margin: 0 auto;
}
label {
display: block;
}
input {
width: 500px;
}
@tzi
tzi / index.html
Created March 1, 2012 16:13
Dectection of Internet Explorer version
<!DOCTYPE html>
<html>
<head>
<title>Test navigator</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<script type="text/javascript" src="internet_explorer_version.js"></script>
<body>
</html>