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
| /** | |
| * A function that takes XML and converts it to JSON | |
| * @param {xml} Input valid XML | |
| * @returns {object} Output valid JSON | |
| */ | |
| function xmlToJson(xml) { | |
| // Create the return object | |
| var obj = {}; | |
| if (xml.nodeType == 1) { // element |
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
| .styled-ol { | |
| counter-reset: li; // Initiate a counter | |
| margin-left: 0; // Remove the default left margin | |
| padding-left: 0; // Remove the default left padding | |
| & > li { | |
| position: relative; // Create a positioning context | |
| padding: 0 0 0 3em; // Give each list item a left margin to make room for the numbers | |
| //padding: 4px 8px; // Add some spacing around the content | |
| list-style: none; // Disable the normal item numbering | |
| border-top: 2px solid #666; |
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 on(elSelector, eventName, selector, fn) { | |
| var element = document.querySelector(elSelector); | |
| element.addEventListener(eventName, function(event) { | |
| var possibleTargets = element.querySelectorAll(selector); | |
| var target = event.target; | |
| for (var i = 0, l = possibleTargets.length; i < l; i++) { | |
| var el = target; | |
| var p = possibleTargets[i]; |
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 openNewWindow(src) { | |
| var src = (src) ? src : 'http://google.com'; | |
| var params = [ | |
| 'location=0', | |
| 'status=1', | |
| 'toolbar=1', | |
| 'scrollbars=1', | |
| 'resizable=1', | |
| 'height=' + (screen.height * .7), | |
| 'width=' + (screen.width * .7), |
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 to Search an Array of Objects | |
| * @param arr --- What array you're searching in | |
| * @param key --- What key you should be looking at in each object | |
| * @param val --- What value you're looking for | |
| * @returns {*} - Returns you the found object that has the matching key or null if not found | |
| */ | |
| function getArrIndexByKeyValue(arr, key, val) { | |
| for (var i = 0; i < arr.length; i++) { | |
| if (arr[i][key] == val) { |
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
| .loading-spinner { | |
| $color: #3386d6; | |
| position: absolute; | |
| top: 50%; | |
| left: 50%; | |
| width: 30px; | |
| height: 30px; | |
| margin-top: -15px; | |
| margin-left: -15px; | |
| &:before { |
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
| ### Packages ### | |
| ##################################### | |
| *.7z | |
| *.dmg | |
| *.gz | |
| *.iso | |
| *.jar | |
| *.rar | |
| *.tar | |
| *.zip |