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
//utility for detecting links in text string | |
detectLinks(string, newtab){ | |
newtab = (newtab == undefined) ? true : newtab; | |
var regexp = /\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i; | |
return newtab ? string.replace(regexp, "<a href='$1' target='_blank'>$1</a>") : string.replace(regexp, "<a href='$1'>$1</a>"); | |
} |
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
'#'+('00000'+(Math.random()*(1<<24)|0).toString(16)).slice(-6); |
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
javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement("script");c.type="text/javascript";c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.4.4",function($,L){$("<div class='vert'></div><div class='horz'></div>").appendTo("body");$(".vert").css({width:"1px",height:"100%",position:"fixed",top:"0px",left:"0px","background-color":"#232323"});$(".horz").css({height:"1px",width:"100%",top:"0px",left:"0px",position:"fixed","background-color":"#232323"});$("html").mousemove(function(a){$(".vert").css({left:a.pageX-$(window).scrollLeft()});$(".horz").css({top:a.pageY-$(window).scrollTop()})});}); |
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
//works only with static urls, like /home.html, etc | |
function lockit(someActiveClass){ | |
var href = window.location.href | |
var split = href.split('/'); | |
if (split[split.length-1] == "") { | |
var urlend = split[split.length-2] | |
} else { | |
var urlend = split[split.length-1] | |
} |
NewerOlder