Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍🎓
enseigner les CSS

Thomas ZILLIOX tzi

👨‍🎓
enseigner les CSS
View GitHub Profile
@tzi
tzi / bm_popin.js
Created Feb 15, 2012
A #javascript #bookmarklet : Provide a generic #popin for other bookmarklets
View bm_popin.js
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 Feb 17, 2012
A #javascript #userscript : Add some happyness to your #ezpublish Back-Office
View HappyEzPublish.user.js
// ==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 / create_element.js
Created Feb 20, 2012
A #javaScript #function : Create HTML element
View create_element.js
function createElement( str ) {
var elem = document.createElement('div');
elem.innerHTML = str;
if ( elem.childNodes.length > 0 ) {
return elem.childNodes[0];
}
return elem;
}
function addImportantStyle( el, styles ) {
var style = '';
@tzi
tzi / bonzo_create.js
Created Feb 21, 2012
A #javaScript #function : Create HTML element inspired by #Bonzo
View bonzo_create.js
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 Feb 22, 2012
A #javascript #userscript : Add a #bl.ocks.org link on #Gist
View GistBlocksLink.user.js
@tzi
tzi / GistBetterEdition.user.js
Created Feb 22, 2012
A #javascript #userscript : Improve the #github #gist edition view : Allow to use Tab, Shift+Tab & Ctrl+D
View GistBetterEdition.user.js
// ==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 / EmbedGithubFile.user.js
Created Feb 22, 2012
A #javascript #userscript : Add an embed link on every #github repository file
View EmbedGithubFile.user.js
// ==UserScript==
// @name EmbedGithubFile
// @description Add an embed action on github repository. Like gist
// @id me.zilliox.EmbedGithubFile
// @homepageURL http://userscripts.org/scripts/show/121119
// @supportURL http://userscripts.org/scripts/discuss/121119
// @updateURL http://userscripts.org/scripts/source/121119.meta.js
// @version 2012.02.27
// @author tzilliox
// @namespace http://zilliox.me
@tzi
tzi / myAnchor.js
Created Feb 23, 2012
A #javascript #bookmarklet : Find the nearest anchor from your click
View myAnchor.js
(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 Feb 23, 2012
A #javascript #userscript : Allow you to filter yours #gist by tag
View GistFilterTag.user.js
// ==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 Feb 28, 2012
A #javascript page to make easily #estimation
View estimation.css
.container {
width: 960px;
margin: 0 auto;
}
label {
display: block;
}
input {
width: 500px;
}