This file contains hidden or 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 createArray(length) { | |
var a = new Array(length || 0); | |
if (arguments.length > 1) { | |
var args = Array.prototype.slice.call(arguments, 1); | |
for (var i = 0; i < length; i++) { | |
a[i] = createArray.apply(this, args); | |
} | |
} |
This file contains hidden or 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 include(src, attributes) | |
{ | |
try { | |
attributes = attributes || {}; | |
attributes.type = "text/javascript"; | |
attributes.src = src; | |
var script = document.createElement("script"); | |
for(aName in attributes) | |
script[aName] = attributes[aName]; |
This file contains hidden or 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
{ | |
def $outputXML = $myObject.data_map.myBlocXML.content.output.output_text|explode('"')|implode('\\"')|explode("\n")|implode(' ')|trim()} | |
} |
This file contains hidden or 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
<iframe width="420" height="345" src="http://www.youtube.com/embed/oHg5SJYRHA0?autoplay=1" frameborder="0" allowfullscreen> | |
</iframe> |
This file contains hidden or 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 intervals = [2,3,4,5]; | |
var index = 0; | |
/** | |
* Custom "setInterval" with internal function modifying the interval | |
* | |
* @param callback The function to call various times | |
* intervals A duration using seconds | |
* index |
This file contains hidden or 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 NL-Checker User Script | |
// @namespace NL-Checker | |
// @description Script de vérifications Newsletter HTML | |
// @icon https://github.com/Elfhir/NL-checker/tree/master/GreaseMonkey/skin/logo.png | |
// @downloadURL https://github.com/Elfhir/NL-checker/blob/master/GreaseMonkey/checker.user.js | |
// @version 2.3 | |
// @grant none | |
// @require http://code.jquery.com/jquery-1.11.3.min.js | |
// @include http://127.0.0.1:8091/nl/* |
This file contains hidden or 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 iframeLazyLoading(iframe_height) { | |
var iframes = $('iframe'); | |
$(document).on("scroll", function(event) { | |
iframes.each(function(index) { | |
var iframe = $(this); | |
if ($(document).scrollTop() > index*iframe_height) { |
This file contains hidden or 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
/** | |
* Defer iframe loading. | |
* | |
* Markup: | |
* <div class="defer-iframe" data-src="{SOURCE URL}" data-{ATTR}="{VAL}"></div> | |
*/ | |
$(window).load( function(){ | |
if ($('.defer-iframe').length) { | |
$('.defer-iframe').each( function() { | |
var $iframe = $('<iframe frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'); |
This file contains hidden or 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
div id="block"> | |
<p class="query"> | |
</p> | |
</div> |
This file contains hidden or 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 libs | |
// @namespace useful scripts | |
// @description load tons of useful scrips as jQuery, Modernizr, etc ... for debugging in console. | |
// @require http://code.jquery.com/jquery-1.12.0.min.js | |
// @require http://underscorejs.org/underscore-min.js | |
// @require https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js | |
// @include * | |
// @version 1 | |
// @grant none |
OlderNewer