:: Import Rule [nobr]

 
<<set $nextButton to "Continue">>
<<set $nextLink to "Rules Assistant">>
//Paste the code into the text box and click Apply//
<br><br>
<span id = "import">
</span>
<<set $tempRule to "">>
<<textbox "$tempRule" $tempRule>>
<<link "Apply">>
	<<if (def $tempRule) && ($tempRule isnot "")>>
		<<set $tempRule to eval('({' + $tempRule + '})')>>
		
		<<if $defaultRules.length > 0>>
			<<set $RulesID += 1>>
		<<else>>
			<<set $RulesID to 1>>
		<</if>>
			
		<<set $tempRule.ID to $RulesID>>
		<<set $defaultRules.push($tempRule)>>
		<<replace #import>>
			''Rule imported successfully!''
			<br><br>
		<</replace>>
	<<else>>
		<<replace #import>>
			''Rule not imported!''
			<br><br>
		<</replace>>	
	<</if>>
	<<unset $tempRule>>
<</link>>
<br><br>
<<link "Continue">>
	<<goto "Rules Assistant">>
<</link>>

src/uncategorized/importRule.tw