function stringEndsWith(str, s){ var reg = new RegExp(s + "$"); return reg.test(str); } $(document).ready(function() { // Add 'retag' to tag names input if present if($('input#tagnames').length !== 0) { if($('input#tagnames').attr('value').length === 0) { $('input#tagnames').attr('value','retag '); } } // Change "login" link to "login (register)" and make more prominent $('#topbar #hlinks a').each( function(i) { if( this.innerHTML === "login" ) { this.style.color = "#cc2222"; this.style.fontSize = "16px"; this.innerHTML = "click here to login (register)"; } else if( this.innerHTML === "register" ) { this.style.color = "#cc2222"; this.style.fontSize = "16px"; this.innerHTML = "click here to register"; } } ); $("
").appendTo('#question .post-menu'); // Round some corners (except for IE6, IE7) if ($.browser.msie && $.browser.version.substr(0,1)<8) { // IE6, IE7; don't round. } else { $('.nav ul li').corner("5px"); $('.system-message-color').corner("5px"); $('.module').corner("7px"); $('.roundme').corner("7px"); } $(function() { $(".module:has(h4:contains('Formatting Reference'))").html( '

Formatting Reference

' + '

_italic text_ or *italic text*

' + '

__bold text__ or **bold text**

' + '

2 spaces at end of line for line break

' + '

bulleted list: - or + or * before line items

' + '

> blockquote

' + '

horizontal rule: --- on own line

' + '

for links, any of:
<http://foo.com>
[foo](http://foo.com)
<a href="http://foo.com">foo</a>

' + '

basic HTML is also allowed

' + '

more about Markdown »

' ); }); // script to remove "code coloring" as well: window.styleCode = function() {}; if( stringEndsWith(window.location, "src=so1") || stringEndsWith(window.location, "src=so2") || stringEndsWith(window.location, "src=so3") ) { $("#additionalWelcome").fadeIn(1500); $("#additionalWelcome").html("

Greetings,
Stack Overflow User!

"); } if( stringEndsWith(window.location, "src=moms4mom.com") ) { $("#additionalWelcome").fadeIn(1500); $("#additionalWelcome").html("

Greetings,
moms4mom.com user!

"); } if( stringEndsWith(window.location, "src=home4film.com") ) { $("#additionalWelcome").fadeIn(1500); $("#additionalWelcome").html("

Greetings,
home4film.com user!

"); } if( stringEndsWith(window.location, "src=facebook.com") ) { $("#additionalWelcome").fadeIn(1500); $("#additionalWelcome").html("

Greetings,
Facebook user!

"); } }); // end document ready function