<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>groupInfo</key>
	<dict>
		<key>expandAfterMode</key>
		<integer>0</integer>
		<key>groupName</key>
		<string>Advanced Webinar: JavaScript</string>
		<key>notes</key>
		<string></string>
	</dict>
	<key>snippetsTE2</key>
	<array>
		<dict>
			<key>abbreviation</key>
			<string>signoff</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Lesson 3: Dates - Example 1: Expand based on date</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>switch(TextExpander.adjustedDate.getDay()){
	case 0: // Sunday
		TextExpander.appendOutput("Have a relaxing weekend!")
	break;
	case 1: // Monday
		TextExpander.appendOutput("Have a great week!")
	break;
	case 2: // Tuesday
		TextExpander.appendOutput("Have a great week!")
	break;
	case 3: // Wednesday
		TextExpander.appendOutput("Happy Wednesday! We're halfway home!")
	break;
	case 4: // Thursday
		TextExpander.appendOutput("Happy Thursday")
	break;
	case 5: // Friday
		TextExpander.appendOutput("Enjoy your Friday!")
	break;
	case 6: // Saturday
		TextExpander.appendOutput("Have a great weekend!")
	break;
	default:
		TextExpander.appendOutput("Have a great day!")
}</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>75AE72B6-3BF9-433F-9F04-BDEE1891673A</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>reformat</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Lesson 4: The Clipboard - Example 1: Reformat clipboard</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>// replace dashes with periods in a phone number

var input = TextExpander.pasteboardText;

// add the g to make this a global replacement
var input.replace(/-/g,".");</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>5E9B11F9-5BB9-4865-A894-BD06C6FB1400</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>welcome</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Example - Lesson 2</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>Hello %filltext:name=Name:width=20%!

Your new email address is: %snippet:js.username%@%fillpopup:name=domain:default=textexpander.com:smilesoftware.com%</string>
			<key>snippetType</key>
			<integer>0</integer>
			<key>uuidString</key>
			<string>34CFA2E3-53B1-477B-9F4B-4EF88C522F12</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>strike</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Lesson 5: Context Dependent - Example 2: TextExpander.expansionContext</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>if(TextExpander.expansionContext == "com.tinyspeck.slackmacgap"){
	TextExpander.appendOutput("~" + TextExpander.pasteboardText +  "~")
}
else{
	TextExpander.appendOutput("~~" + TextExpander.pasteboardText +  "~~")
}</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>CC34503C-38F3-4E91-B65C-6884EAA8B61D</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>crash</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Lesson 5: Context Dependent - Example 1: TextExpander.platform</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>if(TextExpander.platform == "Windows") TextExpander.appendOutput("\"%LOCALAPPDATA%\Smile\TextExpander\"");
if(TextExpander.platform == "macOS") TextExpander.appendOutput("~/Library/Logs/DiagnosticReports/");
if(TextExpander.platform == "Chrome") TextExpander.appendOutput("chrome://extensions/?errors=mmfhhfjhpadoefoaahomoakamjcfcoil");</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>FE34F913-B735-495B-9040-5ADDCDC0EA81</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>setclip</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Lesson 4: The Clipboard - Example 2: Set clipboard</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>var username = "%filltext:name=Name%";

username = username.toLowerCase();

username = username.replace(/\s/g,"_")

TextExpander.pasteboardText = username;

// use a string literal
`Your new username is: ${username}.`;%filltop%</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>88673475-4F09-41B4-8346-A7327DC475B7</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>set-to-payday</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Lesson 3: Dates - Example 2: Set Date</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>var date = new Date(TextExpander.adjustedDate);

// set to the 15th of the month
date.setDate(15);

if(date.getDay() == 1){
	// no bookkeeper on Monday
	date.setDate(date.getDate() - 3)
}
if(date.getDay() == 6){
	// no bookkeeper on Saturday
	date.setDate(date.getDate() - 1)
}
if(date.getDay() == 0){
	// no bookkeeper on Sunday
	date.setDate(date.getDate() - 2)
}

// set the adjusted date to the new value
TextExpander.adjustedDate = date;

// ignore output for this snippet
TextExpander.ignoreOutput = true;</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>57F5A352-FE32-4F89-982E-4EFFE00880B4</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>helloworld2</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Lesson 1: Hello, World! - Example 2: TextExpander.appendOutput</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>// The TextExpander.appendOutput method will append the string to the output

TextExpander.appendOutput("Hello, ")
TextExpander.appendOutput("World!");</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>4745A0B3-718B-4657-AADB-E9E8DEE4D677</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>getam</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Lesson 2: Working with fill-ins - Example 2: Text input</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>var companyName = "%filltext:name=Company Name:width=20%";

TextExpander.appendOutput("We're so excited to have " + companyName + "'s business! ");

if(companyName.toLowerCase() &lt;= "m"){
	// beginning of alphabet
	TextExpander.appendOutput("Alice is your account manager. Please email her at alice@smilesoftware.com.");
}
else{
	// end of alphabet
	TextExpander.appendOutput("Zelda is your account manager. Please email her at zelda@smilesoftware.com.");
}

</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>D7AC6016-40D0-49EA-A2B0-70D23994DFB9</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>username</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Lesson 2: Working with fill-ins - Example 3: TextExpander.filledValues</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>var username = TextExpander.filledValues["Name"];

username = username.toLowerCase();

// replace all whitespace with underscores
username = username.replace(/\s/g,"_");

username;</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>50A60FFD-FAB3-4DD5-A724-AE780FCFCAD9</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>calc</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Lesson 2: Working with fill-ins - Example 1: Numerical input</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>var numberOfWidgets = %filltext:name=Number of Widgets:width=20%;

var cost = numberOfWidgets*5;

"Your order of " + numberOfWidgets + " widgets will cost $" + cost + "."</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>967E3BAF-461E-4FB4-A71B-F60A12E1DC8E</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>helloworld1</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>label</key>
			<string>Lesson 1: Hello, World! - Example 1: Output last line</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:00Z</date>
			<key>plainText</key>
			<string>var hello = "Hello, ";
var world = "World!";

// TextExpander will just output the result of the last line of the snippet

hello + world;</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>7E1AD939-C787-4DC1-9B68-E7A01E754BE0</string>
		</dict>
	</array>
</dict>
</plist>
