Skip to content

Instantly share code, notes, and snippets.

@ekho
ekho / syntax_highliting_for_blogger.js
Last active December 10, 2015 08:08
Syntax highlighting in Blogger
(function() {
var baseUrl = 'http://alexgorbatchev.com/pub/sh/current';
var theme = 'Default';
var bloggerMode = true;
function addScript (uri) {
var e = document.createElement('script'); e.type = 'text/javascript';
e.src = baseUrl + uri;
document.getElementsByTagName('script')[0].parentNode.appendChild(e);
}
@ekho
ekho / gat.js
Created June 6, 2012 04:06
Track outgoing links with google analytics
(function(){
function addEventListener(element, event, listener) {
if (typeof listener != 'function')
return;
if (event == 'ready' && element == document){
if (/(loaded|complete)/.test(document.readyState)) {
listener();
return;
}