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
| // This function creates a new anchor element and uses location | |
| // properties (inherent) to get the desired URL data. Some String | |
| // operations are used (to normalize results across browsers). | |
| function parseURL(url) { | |
| var a = document.createElement('a'); | |
| a.href = url; | |
| return { | |
| source: url, | |
| protocol: a.protocol.replace(':',''), |
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
| /** | |
| * The first commented line is your dabblet’s title | |
| */ | |
| background: #f06; | |
| background: linear-gradient(45deg, #f06, yellow); | |
| min-height: 100%; |
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(){ | |
| var postData={title: "My New Post", content: "This is my first post!"}; | |
| getTemplate('template-1',postData).done(function(data){ | |
| $('body').append(data) | |
| }) | |
| }); | |
| function getTemplate( name,data){ | |
| var d=$.Deferred(); |
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
| //+------------------------------------------------------------------+ | |
| //| Automated Trend Lines.mq4 | | |
| //| Ryan Sheehy, CurrencySecrets.com | | |
| //| http://www.currencysecrets.com | | |
| //+------------------------------------------------------------------+ | |
| #property copyright "Ryan Sheehy, CurrencySecrets.com" | |
| #property link "http://www.currencysecrets.com" | |
| /* | |
| * This script automates the generation and plotting of sloping trend |
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
| //Get DOM elements based on the given CSS Selector - V 1.00.A Beta | |
| //http://www.openjs.com/scripts/dom/css_selector/ | |
| function getElementsBySelector(all_selectors) { | |
| var selected = new Array(); | |
| if(!document.getElementsByTagName) return selected; | |
| all_selectors = all_selectors.replace(/\s*([^\w])\s*/g,"$1");//Remove the 'beutification' spaces | |
| var selectors = all_selectors.split(","); | |
| // Grab all of the tagName elements within current context | |
| var getElements = function(context,tag) { | |
| if (!tag) tag = '*'; |
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 trim(str) | |
| { | |
| return str.replace(/(^\s*)|(\s*$)/g,""); | |
| } |
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 timeSince(date) { | |
| var seconds = Math.floor((new Date() - date) / 1000); | |
| var interval = Math.floor(seconds / 31536000); | |
| if (interval > 1) { | |
| return interval + " years"; | |
| } | |
| interval = Math.floor(seconds / 2592000); |
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
| /*! normalize.css v2.1.2 | MIT License | git.io/normalize */ | |
| /* ========================================================================== | |
| HTML5 display definitions | |
| ========================================================================== */ | |
| /** | |
| * Correct `block` display not defined in IE 8/9. | |
| */ | |
| article, | |
| aside, | |
| details, |
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 getStyle(el,styleProp) | |
| { | |
| var x = document.getElementById(el); | |
| if (x.currentStyle) | |
| var y = x.currentStyle[styleProp]; | |
| else if (window.getComputedStyle){ | |
| console.log(document.defaultView.getComputedStyle(x,null)); | |
| var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp); | |
| } | |
| return y; |
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
| // UPDATE: For latest code, see https://github.com/cstrahan/Showdown.as | |
| // | |
| // Showdown.as -- An ActionScript port of showdown.js | |
| // | |
| // Copyright (c) 2010 Charles Strahan. | |
| // | |
| // Original Showdown Copyright (c) 2007 John Fraser. | |
| // <http://attacklab.net/showdown/> | |
| // | |
| // Original Markdown Copyright (c) 2004-2005 John Gruber |
NewerOlder