<?xml version="1.0" encoding="utf-8"?>
<Application>
	<AppTitle>Site Search Switcher</AppTitle>
	<AppShortName>SSSwitcher</AppShortName>
	<Author>Susan McDonald</Author>
	<Version>1.0</Version>
	<DesignDeviceName>Desktop</DesignDeviceName>
	<Variables>[enginelist],[gPrevSearchfor],[gPrevSelectedSite],[gSearchArray],[gSiteArray],[searchfor],[selectedsite],[selectedsitebutton],[sIndex],[sSearchforEncoded],[sURL],[sURLTemplate]</Variables>
	<VariablesScanned>True</VariablesScanned>
	<PageWidth>800</PageWidth>
	<PageHeight>600</PageHeight>
	<AutoSizeWidth>False</AutoSizeWidth>
	<AutoSizeHeight>False</AutoSizeHeight>
	<HideScrollbars>False</HideScrollbars>
	<ResponsiveSize>True</ResponsiveSize>
	<PublishPlatform>WebApp</PublishPlatform>
	<EmptyBuildFolder>True</EmptyBuildFolder>
	<AppIcon>C:\Users\susan\visualneowebdev\searchswitcher\favicon.ico</AppIcon>
	<LanguageCode>en</LanguageCode>
	<DisplayMode>standalone</DisplayMode>
	<ServiceWorker>Offline page</ServiceWorker>
	<ThemeColor>#000000</ThemeColor>
	<PwaScope>/</PwaScope>
	<MobileOSTypes>[AndroidOS,iOS,WindowsPhoneOS]</MobileOSTypes>
	<WindowState>normal</WindowState>
	<TitleBar>True</TitleBar>
	<Sizeable>True</Sizeable>
	<MaximizeBtn>False</MaximizeBtn>
	<MinimizeBtn>True</MinimizeBtn>
	<SystemMenu>True</SystemMenu>
	<ContextMenu>False</ContextMenu>
	<AlwaysOnTop>False</AlwaysOnTop>
	<ShowInTaskbar>True</ShowInTaskbar>
	<SingleInstance>False</SingleInstance>
	<ChromeKioskMode>False</ChromeKioskMode>
	<Components>
		<FunctionList name="Subroutines">
			<Components>
				<Function name="openSearch">
					<Code>console.log(pURL)
window.open(pURL, &quot;_blank&quot;);</Code>
					<Params>[pURL]|STRING|</Params>
					<ScriptLanguage>JavaScript</ScriptLanguage>
				</Function>
				<Function name="keyDown">
					<Code>If [pKey] = 13
  doSearch
EndIf</Code>
					<Params>[pKey]|INTEGER|</Params>
				</Function>
				<Function name="doSearch">
					<Code>If [selectedsite] = &quot;Bible Gateway&quot;
  SetVar [sURLTemplate] &quot;http://www.biblegateway.com/passage/?search=#&amp;version=NIVUK&quot;
EndIf
If [selectedsite] = &quot;Bing&quot;
  SetVar [sURLTemplate] &quot;https://www.bing.com/search?q=#&quot;
EndIf
If [selectedsite] = &quot;Brave&quot;
  SetVar [sURLTemplate] &quot;https://search.brave.com/search?q=#&quot;
EndIf
If [selectedsite] = &quot;DuckDuckGo&quot;
  SetVar [sURLTemplate] &quot;https://duckduckgo.com/?&amp;q=#&amp;ia=web&quot;
EndIf
If [selectedsite] = &quot;Ecosia&quot;
  SetVar [sURLTemplate] &quot;https://www.ecosia.org/search?q=#&amp;addon=opensearch&quot;
EndIf
If [selectedsite] = &quot;Google&quot;
  SetVar [sURLTemplate] &quot;https://www.google.com/search?q=#&quot;
EndIf
If [selectedsite] = &quot;Groot&quot;
  SetVar [sURLTemplate] &quot;https://groot.ssuiteoffice.com/#gsc.tab=0&amp;gsc.sort=&amp;gsc.q=#&quot;
EndIf
If [selectedsite] = &quot;IMDB&quot;
  SetVar [sURLTemplate] &quot;https://www.imdb.com/find/?ref_=opensearch&amp;q=#&quot;
EndIf
If [selectedsite] = &quot;Mojeek&quot;
  SetVar [sURLTemplate] &quot;https://www.mojeek.com/search?theme=dark&amp;q=#&quot;
EndIf
If [selectedsite] = &quot;Naver&quot;
  SetVar [sURLTemplate] &quot;https://search.naver.com/search.naver?where=nexearch&amp;sm=top_hty&amp;fbm=0&amp;ie=utf8&amp;query=#&quot;
EndIf
If [selectedsite] = &quot;Quora&quot;
  SetVar [sURLTemplate] &quot;https://www.quora.com/search?q=#&quot;
EndIf
If [selectedsite] = &quot;Qwant&quot;
  SetVar [sURLTemplate] &quot;https://www.qwant.com?q=#&amp;client=opensearch&quot;
EndIf
If [selectedsite] = &quot;Reddit&quot;
  SetVar [sURLTemplate] &quot;https://www.reddit.com/search?q=#&quot;
EndIf
If [selectedsite] = &quot;Stack Overflow&quot;
  SetVar [sURLTemplate] &quot;https://stackoverflow.com/search?q=#&quot;
EndIf
If [selectedsite] = &quot;Startpage&quot;
  SetVar [sURLTemplate] &quot;https://www.startpage.com/sp/search?query=#&amp;cat=web&amp;pl=opensearch&amp;language=english&quot;
EndIf
If [selectedsite] = &quot;Tempest&quot;
  SetVar [sURLTemplate] &quot;https://www.tempest.com/search?q=#&quot;
EndIf
If [selectedsite] = &quot;Thesaurus&quot;
  SetVar [sURLTemplate] &quot;https://www.thesaurus.com/browse/#&quot;
EndIf
If [selectedsite] = &quot;Wikipedia&quot;
  SetVar [sURLTemplate] &quot;https://en.wikipedia.org/w/api.php?action=opensearch&amp;search=#&quot;
EndIf
If [selectedsite] = &quot;Yahoo!&quot;
  SetVar [sURLTemplate] &quot;http://search.yahoo.com/search?ei=utf-8&amp;fr=sfp&amp;iscqry=&amp;p=#&quot;
EndIf
If [selectedsite] = &quot;Yandex&quot;
  SetVar [sURLTemplate] &quot;https://yandex.com/search/?text=#&quot;
EndIf


If [searchfor] != &quot;&quot;
  IfEx [searchfor] != [gPrevSearchfor] or [selectedsite] != [gPrevSelectedSite]
    StrEncodeURI [searchfor] [sSearchforEncoded]
    StrReplace [sURLTemplate] &quot;#&quot; [sSearchforEncoded] [sURL] &quot;&quot;
    openSearch [sURL]
    SetVar [gPrevSearchfor] [searchfor]
    SetVar [gPrevSelectedSite] [selectedsite]
  EndIf
EndIf</Code>
				</Function>
			</Components>
		</FunctionList>
		<LibraryList name="Libraries"/>
		<PageList name="Main">
			<Components>
				<Page id="NewPage">
					<style>background-color:#e8ddcb</style>
					<pageenter>StrParse &quot;Bible Gateway,Bing,Brave,DuckDuckGo,Ecosia,Google,Groot,IMDB,Mojeek,Naver,Quora,Qwant,Reddit,Stack Overflow,Startpage,Tempest,Thesaurus,Wikipedia,Yahoo!,Yandex&quot; &quot;,&quot; [gSiteArray]
SetVar [enginelist] [gSearchArray]
SetVar [gPrevSearchfor] &quot;&quot;
SetVar [gPrevSelectedSite] &quot;&quot;

OnKeyDown &quot;keyDown&quot;</pageenter>
					<Components>
						<Container id="containermain">
							<left>24px</left>
							<top>64px</top>
							<width>752px</width>
							<height>536px</height>
							<style>background-color:#e8ddcb</style>
							<Components>
								<TextInput id="txtsearchfor">
									<left>24px</left>
									<top>32px</top>
									<width>552px</width>
									<height>40px</height>
									<variable>[searchfor]</variable>
								</TextInput>
								<PushButton id="btnsearch">
									<left>592px</left>
									<top>32px</top>
									<width>136px</width>
									<height>40px</height>
									<caption>Search</caption>
									<click>doSearch</click>
								</PushButton>
								<RadioButton id="radyandex">
									<left>456px</left>
									<top>88px</top>
									<width>96px</width>
									<height>32px</height>
									<caption>Yandex</caption>
									<prop_name>radgroup1</prop_name>
									<variable>[selectedsitebutton]</variable>
									<change>SetVar [selectedsite] &quot;Yandex&quot;</change>
									<value>Yandex</value>
								</RadioButton>
								<RadioButton id="radqwant">
									<left>376px</left>
									<top>88px</top>
									<width>88px</width>
									<height>32px</height>
									<caption>Qwant</caption>
									<prop_name>radgroup1</prop_name>
									<variable>[selectedsitebutton]</variable>
									<change>SetVar [selectedsite] &quot;Qwant&quot;</change>
									<value>Qwant</value>
								</RadioButton>
								<RadioButton id="radgoogle">
									<left>288px</left>
									<top>88px</top>
									<width>80px</width>
									<height>32px</height>
									<caption>Google</caption>
									<prop_name>radgroup1</prop_name>
									<variable>[selectedsitebutton]</variable>
									<change>SetVar [selectedsite] &quot;Google&quot;</change>
									<value>Google</value>
								</RadioButton>
								<RadioButton id="radecosia">
									<left>208px</left>
									<top>88px</top>
									<width>88px</width>
									<height>32px</height>
									<caption>Ecosia</caption>
									<prop_name>radgroup1</prop_name>
									<variable>[selectedsitebutton]</variable>
									<change>SetVar [selectedsite] &quot;Ecosia&quot;</change>
									<value>Ecosia</value>
								</RadioButton>
								<RadioButton id="radduckduckgo">
									<left>88px</left>
									<top>88px</top>
									<width>120px</width>
									<height>32px</height>
									<caption>DuckDuckGo</caption>
									<prop_name>radgroup1</prop_name>
									<variable>[selectedsitebutton]</variable>
									<change>SetVar [selectedsite] &quot;DuckDuckGo&quot;</change>
									<value>DuckDuckGo</value>
								</RadioButton>
								<RadioButton id="radbing">
									<left>24px</left>
									<top>88px</top>
									<width>56px</width>
									<height>32px</height>
									<caption>Bing</caption>
									<prop_name>radgroup1</prop_name>
									<variable>[selectedsitebutton]</variable>
									<checked>True</checked>
									<change>SetVar [selectedsite] &quot;Bing&quot;</change>
									<value>Bing</value>
								</RadioButton>
								<RadioButton id="radother">
									<left>24px</left>
									<top>136px</top>
									<width>80px</width>
									<height>32px</height>
									<caption>Other</caption>
									<prop_name>radgroup1</prop_name>
									<variable>[selectedsitebutton]</variable>
									<value>Other</value>
								</RadioButton>
								<Listbox id="lstselectedsite">
									<left>104px</left>
									<top>136px</top>
									<width>472px</width>
									<height>384px</height>
									<items>[gSiteArray]</items>
									<variable>[selectedsite]</variable>
									<init_value>Bing</init_value>
									<multi_select>False</multi_select>
									<change>StrSearch [selectedsite] &quot;Bing,DuckDuckGo,Ecosia,Google,Qwant,Yandex&quot; [sIndex]
If [sIndex] &lt; 0
  SetVar [selectedsitebutton] &quot;Other&quot;
Else
  SetVar [selectedsitebutton] [selectedsite]
EndIf</change>
								</Listbox>
							</Components>
						</Container>
						<Container id="containerheading">
							<left>0px</left>
							<top>0px</top>
							<width>800px</width>
							<height>64px</height>
							<style>background-color:#033649;border-style:solid;border-width:1px</style>
							<Components>
								<Headline id="lblheading">
									<left>16px</left>
									<top>8px</top>
									<width>760px</width>
									<height>56px</height>
									<style>color:#FFFFFF;text-align:center</style>
									<text>Site Search Switcher</text>
								</Headline>
							</Components>
						</Container>
					</Components>
				</Page>
			</Components>
		</PageList>
		<PageList name="Master">
			<Components>
				<Page id="MasterPage"/>
			</Components>
		</PageList>
		<PageList name="Dialog">
			<Components>
				<Page id="NewDialog">
					<Components>
						<DialogContainer id="DialogContainer1">
							<left>0px</left>
							<top>0px</top>
							<width>800px</width>
							<height>600px</height>
							<close_button>False</close_button>
							<kind>custom</kind>
						</DialogContainer>
					</Components>
				</Page>
			</Components>
		</PageList>
	</Components>
</Application>
