This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<trizbort version="1.5.9.2"> | |
<info /> | |
<map> | |
<room id="1" name="A Way In!" subtitle="" x="-1536" y="2400" w="96" h="96" region="NoRegion" handDrawn="no" ellipse="no" roundedCorners="no" cornerTopLeft="15" cornerTopRight="15" cornerBottomLeft="15" cornerBottomRight="15" borderstyle="Dot" description="" roomFill="" secondFill="" secondFillLocation="Bottom" roomBorder="" roomLargeText="" roomSmallText="" /> | |
<room id="2" name="" subtitle="" x="-1536" y="2592" w="96" h="96" region="NoRegion" handDrawn="no" ellipse="no" roundedCorners="no" cornerTopLeft="15" cornerTopRight="15" cornerBottomLeft="15" cornerBottomRight="15" borderstyle="Solid" description="" roomFill="" secondFill="" secondFillLocation="Bottom" roomBorder="" roomLargeText="" roomSmallText="" /> | |
<line id="3" startText="down" endText="up"> | |
<dock index="0" id="1" port="ssw" /> | |
<dock index="1" id="2" port="nne" /> | |
</line> |
This file contains 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
// WIP: Pretty much all of them need work. | |
// TODO: Eventually remove the need for JSBeautify pretty printing / space sensitivity. | |
// Unexpected 'in'. Compare with undefined, or use the hasOwnProperty method instead. | |
// TODO: detect if it is a "for in" line and ignore. | |
// UNSTABLE: Matches for (foo in bar). | |
Match: ("?[\w\._]+"?) in ([\w\._]+) | |
Replace: \2.hasOwnProperty\(\1\) |
This file contains 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 changeElement(element, tagName) { | |
"use strict"; | |
/** | |
* Dependencies: document | |
* Change an html element from one tag to another. | |
* @param {!Object} element An HTML Element. | |
* @param {string} tagName the tag name to change your element to. | |
*/ | |
if (!document || typeof element !== "object" || typeof tagName !== "string") { | |
throw new Error("changeElement: Expected this function to run within an environment containing the 'document' global variable, Element to be an HTML Element and tagName to be a string. document=" + Boolean(document) + " typeof element=" + typeof element + " typeof tagName=" + typeof tagName); |