Skip to content

Instantly share code, notes, and snippets.

@tegomass
tegomass / greasemonkey_header.js
Last active February 11, 2017 21:50
Simple header for GreaseMonkey Script
// ==UserScript==
// @name GM_name
// @namespace https://gist.github.com/tegomass
// @description GM_description
// @include https://mail.google.com/*
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js
// @exclude %exclude%
// @version 1
// @grant GM_addStyle
// ==/UserScript==
@tegomass
tegomass / waitForGmail.js
Last active February 11, 2017 21:40
WaitForGmail loading -- The jQuery ready function doesn't work on AJAX call, use this instead -- Use this link to embed : https://gist.githubusercontent.com/tegomass/734b5a868f9222a6c1a89a42232768b5/raw/
/*
usage example: waitForGmail(function(){ console.log('TEGO!!')});
*/
function waitForGmail(callback){
if (window.top != window.self) //don't run on frames or iframes
return;
var zGbl_PageChangedByAJAX_Timer = '';
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
@tegomass
tegomass / leboncoin_rss.user.js
Last active February 22, 2017 08:30
Greasemonkey script for LeBonCoin - A kind of RSS for the website Le bon coin with your query -- each time you reload a page, a GET request is sent to lbc and match your query. If a new offer is available, the link is shown on the top of the page.
// ==UserScript==
// @name Leboncoin RSS
// @namespace http://gist.github.com/tegomass/18866de2d73399136151cd1e7ea8e8b4
// @author Tegomass
// @description A kind of RSS for LeBonCoin with your personnal search
// @include *
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js
// @version 1.4
// @updateURL https://gist.githubusercontent.com/tegomass/18866de2d73399136151cd1e7ea8e8b4/raw
// @grant GM_addStyle