From 0f5a83b97025eb23353d813178c27df39ca6a580 Mon Sep 17 00:00:00 2001
From: Kasen IO <kasenvr@gmail.com>
Date: Fri, 28 Feb 2020 01:44:54 -0500
Subject: [PATCH] Adds more app as default script w/ beta branch pulling from
 repo URL.

---
 scripts/defaultScripts.js              |   2 +-
 scripts/system/more/app-more.js        | 136 +++++++++++++++
 scripts/system/more/appicon_a.png      | Bin 0 -> 521 bytes
 scripts/system/more/appicon_i.png      | Bin 0 -> 511 bytes
 scripts/system/more/blank_minus-16.png | Bin 0 -> 250 bytes
 scripts/system/more/blank_plus-16.png  | Bin 0 -> 251 bytes
 scripts/system/more/css/styles.css     | 188 +++++++++++++++++++++
 scripts/system/more/del-x-16.png       | Bin 0 -> 536 bytes
 scripts/system/more/minus-16.png       | Bin 0 -> 385 bytes
 scripts/system/more/more.html          | 225 +++++++++++++++++++++++++
 scripts/system/more/plus-16.png        | Bin 0 -> 393 bytes
 scripts/system/more/search-32.png      | Bin 0 -> 1584 bytes
 12 files changed, 550 insertions(+), 1 deletion(-)
 create mode 100644 scripts/system/more/app-more.js
 create mode 100644 scripts/system/more/appicon_a.png
 create mode 100644 scripts/system/more/appicon_i.png
 create mode 100644 scripts/system/more/blank_minus-16.png
 create mode 100644 scripts/system/more/blank_plus-16.png
 create mode 100644 scripts/system/more/css/styles.css
 create mode 100644 scripts/system/more/del-x-16.png
 create mode 100644 scripts/system/more/minus-16.png
 create mode 100644 scripts/system/more/more.html
 create mode 100644 scripts/system/more/plus-16.png
 create mode 100644 scripts/system/more/search-32.png

diff --git a/scripts/defaultScripts.js b/scripts/defaultScripts.js
index d9c84467a3..2d4e19f2e4 100644
--- a/scripts/defaultScripts.js
+++ b/scripts/defaultScripts.js
@@ -35,12 +35,12 @@ var DEFAULT_SCRIPTS_COMBINED = [
     "system/miniTablet.js",
     "system/audioMuteOverlay.js",
     "system/keyboardShortcuts/keyboardShortcuts.js",
-    "https://kasenvr.github.io/community-apps/more/app-more.js"
 ];
 var DEFAULT_SCRIPTS_SEPARATE = [
     "system/controllers/controllerScripts.js",
     "communityModules/notificationCore/notificationCore.js",
     "simplifiedUI/ui/simplifiedNametag/simplifiedNametag.js",
+    {"stable": "system/more/app-more.js", "beta": "https://kasenvr.github.io/community-apps/more/app-more.js"},
     {"stable": "communityModules/chat/FloofChat.js", "beta": "https://content.fluffy.ws/scripts/chat/FloofChat.js"}
     //"system/chat.js"
 ];
diff --git a/scripts/system/more/app-more.js b/scripts/system/more/app-more.js
new file mode 100644
index 0000000000..91e5508a6b
--- /dev/null
+++ b/scripts/system/more/app-more.js
@@ -0,0 +1,136 @@
+"use strict";
+
+//  app-more.js
+//  VERSION 1.0
+//
+//  Created by Keb Helion, February 2020.
+//  Copyright 2020 Project Athena and contributors.
+//
+//  This script adds a "More Apps" selector to "Project Athena" to allow the user to add optional functionalities to the tablet.
+//  This application has been designed to work directly from the Github repository.
+//
+//  Distributed under the Apache License, Version 2.0.
+//  See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
+//	
+(function() {
+	var ROOT = Script.resolvePath('').split("app-more.js")[0];
+	var APP_NAME = "MORE...";
+	var APP_URL = ROOT + "more.html";
+	var APP_ICON_INACTIVE = ROOT + "appicon_i.png";
+	var APP_ICON_ACTIVE = ROOT + "appicon_a.png";
+	var Appstatus = false;
+	var lastProcessing = {
+			"action": "",
+			"script": ""
+		};
+	
+	var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
+	tablet.screenChanged.connect(onScreenChanged);
+	var button = tablet.addButton({
+		text: APP_NAME,
+		icon: APP_ICON_INACTIVE,
+        activeIcon: APP_ICON_ACTIVE
+	});
+	
+	
+	function clicked() {
+		if (Appstatus == true) {
+			tablet.webEventReceived.disconnect(onMoreAppWebEventReceived);
+			tablet.gotoHomeScreen();
+			Appstatus = false;
+		} else {
+			tablet.gotoWebScreen(APP_URL);			
+			tablet.webEventReceived.connect(onMoreAppWebEventReceived);		
+			Appstatus = true;
+		}
+			
+		button.editProperties({
+			isActive: Appstatus
+		});
+
+	}
+	
+	button.clicked.connect(clicked);
+
+	function sendRunningScriptList() {
+		var currentlyRunningScripts = ScriptDiscoveryService.getRunning();
+		tablet.emitScriptEvent(JSON.stringify(currentlyRunningScripts));
+	}
+
+	function onMoreAppWebEventReceived(eventz) {
+        
+		if (typeof eventz === "string") {
+			eventzget = JSON.parse(eventz);
+			
+			//print("EVENT ACTION: " + eventzget.action);
+			//print("EVENT SCRIPT: " + eventzget.script);
+			
+			if (eventzget.action === "installScript") {
+				
+				if (lastProcessing.action == eventzget.action && lastProcessing.script == eventzget.script) {
+					return;
+				} else {
+					ScriptDiscoveryService.loadOneScript(eventzget.script);
+				
+					lastProcessing.action = eventzget.action;
+					lastProcessing.script = eventzget.script;
+					
+					Script.setTimeout(function() {
+						sendRunningScriptList(); 
+					}, 2000);
+				}
+			}
+
+			if (eventzget.action === "uninstallScript") {
+				
+				if (lastProcessing.action == eventzget.action && lastProcessing.script == eventzget.script) {
+					return;
+				} else {
+					ScriptDiscoveryService.stopScript(eventzget.script, false);
+					
+					lastProcessing.action = eventzget.action;
+					lastProcessing.script = eventzget.script;
+					
+					Script.setTimeout(function() {
+						sendRunningScriptList(); 
+					}, 2000);
+				}	
+			}			
+
+			if (eventzget.action === "requestRunningScriptData") {
+				sendRunningScriptList();
+			}	
+
+		}
+		
+	}
+
+
+	function onScreenChanged(type, url) {
+		if (type == "Web" && url.indexOf(APP_URL) != -1) {
+			//Active
+			//print("MORE... ACTIVE");
+			Appstatus = true;
+		} else {
+			//Inactive
+			//print("MORE... INACTIVE");
+			Appstatus = false;
+		}
+		
+		button.editProperties({
+			isActive: Appstatus
+		});
+	}
+	
+	
+	function cleanup() {
+		if (Appstatus) {
+			tablet.gotoHomeScreen();
+			tablet.webEventReceived.disconnect(onMoreAppWebEventReceived);
+		}
+		tablet.screenChanged.disconnect(onScreenChanged);
+		tablet.removeButton(button);
+	}
+	
+	Script.scriptEnding.connect(cleanup);
+}());
\ No newline at end of file
diff --git a/scripts/system/more/appicon_a.png b/scripts/system/more/appicon_a.png
new file mode 100644
index 0000000000000000000000000000000000000000..b62d59774686a43d1f07bf0d0f208aa5cd8fdf98
GIT binary patch
literal 521
zcmeAS@N?(olHy`uVBq!ia0y~yU@!t<4mJh`208nVjSLJ7oCO|{#S9GG!XV7ZFl&wk
z0|Ns~x}&cn1H;C?n%{ww85kH8l0AZa85pWm85kOx85n;4XJBY}$-q!*z`*b-fq}tl
z1_Oh5{-pS$ZVU{J^`0({Ar-fh{`~)Mf4G2wf$<2Fl7ysW=SN;;F~h3Yhq)XkG732O
z@Em4gV7aj2BZmV6uXI1r%#9On$tY}>bX2XiV02*Moh`x0u^{oWU;{&v<btp_^;zon
z4GdCdhD-tuhmR>UFq-7pFbO#5lx%x%KQoK-nK(#Y!-3=_t<M>mGH$5og7^-*{|6gC
zV_?d-aRkjVA+M*uVo+#^crm9jGt7X2ML^d}*Uf4+`!^K_hKq~8dW$m%IBZ$t{_nDt
zrD8G2fGJThE0JtRXS$rOYFQyQGfI~Q=F}^BfB!8n^ANu6#K562&2ieC6W?q=o?F6-
z;thyF6COu}y!B*axv-&Auz^9ULt>%lcL{|CiT2Znj2jr384~ps8vA#hYh_?yVDNPH
Kb6Mw<&;$To>7oe$

literal 0
HcmV?d00001

diff --git a/scripts/system/more/appicon_i.png b/scripts/system/more/appicon_i.png
new file mode 100644
index 0000000000000000000000000000000000000000..e765410b50e836051e64a1064681bbc9504db3a9
GIT binary patch
literal 511
zcma)2&nrW50RO!2o_V&$(}Wi5)r)tb{K`S(O~ZDu7!H0ELm4R|wU&5@-twy`$*-1>
zA5m(501d6g$pIG!F5`fNgr*k<a&h?7=X3e|@|4<&bsB>PfX-?$+W}-KVAKGN`SK2c
zhz?6t7ogQEpfEch4}fkqm6(8?@t(J`DF9rf#a;rqlK^QDcntwk5a><=Zt8)Y86d8G
zvhJV=pt`MQQ-$lI;XM?}_jdr)K3VZR==j)l_pLtyMD{plAi<Drq!_Q`D*C^ai|w3M
zU1#%a-Y5Z#*P-V@WwqrJR`jnvX<5;qTm<4gbJ3hMJXQ=M51l-J2<54J?}QaoRIF>%
zcb_XlH@6(7Xy;2`>tTYT<A3+)Z~d?*f@ZY~nQ6xwwS=X@^#e=u<L)BOaBg33kbub3
zPl3K_L1>Cp4D8zP$RFu{sIzK<t>nu$hwxohzSz19okq4a)G(m-GXj(P^Tlw+>zMNW
zn(<|%?yMcz$g?V6r4v?EMe|ufql#vaN^Q0PxLw?(8044@AqN1gg*NkcLH)odCy<&b

literal 0
HcmV?d00001

diff --git a/scripts/system/more/blank_minus-16.png b/scripts/system/more/blank_minus-16.png
new file mode 100644
index 0000000000000000000000000000000000000000..dfa1a828022661d728f0c4f08d715bc5db4b5370
GIT binary patch
literal 250
zcmeAS@N?(olHy`uVBq!ia0y~yU{GLSU=ZM7V_;w?XQ+*2U|`@Z@Q5sCVBk9f!i-b3
z`J@>b7+BIBeH|GXHuly04x9|qmFyAZ%fL{j%D~Xj%)s#TKLbO<O9qBg0|tgy2@DKY
zGZ+}e^C!h0bz@*)DDZS~45_%4^ymM7`@;@Q4Gc+15(x|f4$SWu8W^Ms*cn(ZG*~kz
zG(@b(yzwk|dxzh}eQ{Ym3Q`IUY&I+mOc@7cu_$J{!^psB@_>(lV*z71g98Ka4rZv*
b1cu7*?DCh6-{@dqU|{fc^>bP0l+XkK$T343

literal 0
HcmV?d00001

diff --git a/scripts/system/more/blank_plus-16.png b/scripts/system/more/blank_plus-16.png
new file mode 100644
index 0000000000000000000000000000000000000000..c40ab2044308b2fc46d528209b8652e3ca27b0d0
GIT binary patch
literal 251
zcmeAS@N?(olHy`uVBq!ia0y~yU{GLSU=ZM7V_;w?XQ+*2U|`@Z@Q5sCVBk9f!i-b3
z`J@>b7+BIBeH|GXHuly04x9|qmFyAZ%fL{j%D~Xj%)s#TKLbO<O9qBg0|tgy2@DKY
zGZ+}e^C!h0bz@*)DD-r345_%4^ymM7`@;@Q4Gc+15(x|f4$SWu8W^Ms*cn(ZG*~kz
zG(;ryoV}eVI9IB6?-hxaPeGC&1Q<9LFqShoF!1hRW?;%VAd5vG+Z{#*Mw178P^Arw
a3|(yO@;cSCofsGx7(8A5T-G@yGywqHZ9zQ%

literal 0
HcmV?d00001

diff --git a/scripts/system/more/css/styles.css b/scripts/system/more/css/styles.css
new file mode 100644
index 0000000000..54066b694b
--- /dev/null
+++ b/scripts/system/more/css/styles.css
@@ -0,0 +1,188 @@
+/*
+    styles.css
+
+    Created by Kalila L. on 23 Feb 2020.
+    Copyright 2020 Project Athena and contributors.
+    
+    Distributed under the Apache License, Version 2.0.
+    See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
+*/
+
+body {
+    background: #27343B;
+    font-family: 'Merriweather', sans-serif;
+    font-size: 14px;
+    color: #FFFFFF;
+    font-weight: 600;
+    text-decoration: none;
+    font-style: normal;
+    font-variant: normal;
+    text-transform: none;
+}
+
+h1 {
+    font-family: 'Quicksand', sans-serif;
+    font-size: 28px;
+    color: #ffffff;
+    font-weight: 800;
+    text-decoration: none;
+    font-style: normal;
+    font-variant: normal;
+    text-transform: none;
+    text-shadow: 3px 3px 3px rgba(63,64,76,1);
+}
+
+h1.mainTitle {
+    
+}
+
+p.mainDesc {
+    font-size: 16px;
+}
+
+p a {
+    color: SteelBlue;
+}
+
+font.appname {
+    font-family: 'Merriweather', sans-serif;
+    font-size: 18px;
+    color: #CFB538;
+    font-weight: 800;
+    text-decoration: none;
+    font-style: normal;
+    font-variant: normal;
+    text-transform: none;
+    margin-bottom: 5px;
+    float: left;
+    clear: both;
+}
+
+font.appdesc {
+    font-family: 'Merriweather', sans-serif;
+    font-size: 15px;
+    color: #ffffff;
+    font-weight: 500;
+    text-decoration: none;
+    font-style: normal;
+    font-variant: normal;
+    text-transform: none;
+    margin-bottom: 5px;
+    float: left;
+    clear: both;
+}
+
+font.noresult {
+    font-family: Arial, Helvetica, sans-serif;
+    font-size: 18px;
+    color: #aaaaaa;
+    font-weight: 500;
+    text-decoration: none;
+    font-style: normal;
+    font-variant: normal;
+    text-transform: none;
+}
+
+font.caption {
+    font-family: Arial, Helvetica, sans-serif;
+    font-size: 12px;
+    color: #ffffff;
+    font-weight: 600;
+    text-decoration: none;
+    font-style: normal;
+    font-variant: normal;
+    text-transform: none;
+}
+
+font.pager {
+    font-family: 'Quicksand', sans-serif;
+    font-size: 14px;
+    color: #B2B5D9;
+    font-weight: 600;
+    text-decoration: none;
+    font-style: normal;
+    font-variant: normal;
+    text-transform: none;
+}
+
+div.iconContainer{
+    border-radius: 15px;
+    background: #000000;
+    padding: 5px;
+    width: 70px;
+    height: 70px;
+    text-align: center;
+}
+
+table.item {
+    background: #3E415E;
+}
+
+td {
+    vertical-align: top;
+    padding: 5px;
+}
+
+button.install {
+    font-family: Arial, Helvetica, sans-serif;
+    background-color: #008CBA;
+    font-size: 16px;
+    color: #ffffff;
+    font-weight: 600;
+    border-radius: 6px;
+    border: 2px solid #008CBA;
+    transition-duration: 0.3s;
+    float: right;
+}
+
+button.install:hover {
+  background-color: #10afe3; 
+  border: 2px solid #10afe3;
+}
+
+button.uninstall {
+    font-family: Arial, Helvetica, sans-serif;
+    background-color: #b34700;
+    font-size: 16px;
+    color: #ffffff;
+    font-weight: 600;
+    border-radius: 6px;
+    border: 2px solid #b34700;
+    transition-duration: 0.3s;
+    float: right;
+}
+
+button.uninstall:hover {
+  background-color: #e34c22; 
+  border: 2px solid #e34c22;
+}
+
+button.processing {
+    font-family: Arial, Helvetica, sans-serif;
+    background-color: #b59207;
+    font-size: 16px;
+    color: #ffffff;
+    font-weight: 600;
+    border-radius: 6px;
+    border: 2px solid #b59207;
+    transition-duration: 0.3s;
+    float: right;
+}
+
+div.searchbox {
+    border-radius: 6px;
+    background: #ffffff;
+    padding: 4px;
+    border: 0px;
+    vertical-align: middle;
+}
+
+input.searchtextbox{
+    font-family: Arial, Helvetica, sans-serif;
+    font-size: 14px;
+    color: #000000;
+    font-weight: 400;
+    text-decoration: none;
+    border: 0px;
+    outline-color: #ffffff;
+}
\ No newline at end of file
diff --git a/scripts/system/more/del-x-16.png b/scripts/system/more/del-x-16.png
new file mode 100644
index 0000000000000000000000000000000000000000..9a5153d26fe29651c1378d4f010ddb0730aece1b
GIT binary patch
literal 536
zcmV+z0_XjSP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00009a7bBm000id
z000id0mpBsWB>pF1ZP1_K>z@;j(q!3lK=n!AY({UO#lFTB>(_`g8%^e{{R4h=>PzA
zFaQARU;qF*m;eA5Z<1fdMgRZ-j!8s8RCwBA{Qv(y10?_;fLK68XJ;p}m<SMu1F<&{
z8v`*T5MKb|?LfQ~h+n}JmY0_^00a;Vnt@(GJQ;|U(8OJ#I3I{hfOri|0w92p4e)?U
zaN=>XJP<F3vcZM`1P~LHBMii|pqkx)cmWp8Yk}Ai>ZR#GEDaI_2q2gNkw7d9#Gnw3
z0ODLAUX7#~<o_ff4uk3eg;P980w923Uhsp`j8KKVK%4@^96-zswV)p=2LtXv+y)Rp
zFatEvoEr-DP8<;b1>%`dmmvcc5CITCFawyd_!(sLA0Yk>WupU-YZ(9n2&VA{n&dVh
z4ul5mN+6Cw3lk8y2O<Ch2xh<*B#G5fKleeM4GN#xK%5N3OP~P_0=q#3KmfrE07*Q9
zvZsO)Ct84kLVpGjPlJZZdmx?%k^l%Gm;tY$Q3vw#ULelE;^!zJJ`BXnKwJpKk3oU}
z0fZcQ>wq{KIjv&>Z=o(*2onGZAoRSj3W$$G1I-19)u5q$7wWP_K>Pq%13&;VQktCs
a0t^5eg+!7ui7!6@0000<MNUMnLSTYxU$f%?

literal 0
HcmV?d00001

diff --git a/scripts/system/more/minus-16.png b/scripts/system/more/minus-16.png
new file mode 100644
index 0000000000000000000000000000000000000000..e5caf2615c930c6d7a1b5b2b74119a1c3862fee9
GIT binary patch
literal 385
zcmWlTTPQ<u0Ed4&J2uAVuXGI2Y80{ZU?rEF|2pGLZH@Ne61Gt&i_B%Y)EUuG6jSm<
zp_Wo8UddcaN|f;6jZnP0)^r}e$M5T#b~>uHnhXs9txXi_02ly}col#lj5PpA=oK6M
zfG#SdSSrwE0$@9+odP>^qrbI_vehQm*@59)K$-x)V}SGu3={!xZlH7-Nb6Z>J*fil
zX%na`@ZkN6#VU_^MuOL?cZ2ZC4@k)9RfD~f%3zS{U%Kv}eFs7?TtP;@h9etN6ijIH
zl<TvY*d|R>C0@JLU`e93&^*<s+FRDn?#>sfc<eZjELOwQOnZdn|0tNyWKtsKN~kH$
zW34F%;R}WO^C@or)D_APq{@Np+4NwTBO}ywkYf%^E1-yqHO=S`bH!i2Ro#N|=CS&)
zJ1^M_mKbxFQm$y9^X!h#+H|bnUhwLdpk6jEAIJ*tSyTG;E%KJpwAI$h>{EYg@~#q0
V5~RWMciP<T0sx!UA#7XR<NqA4bN>JU

literal 0
HcmV?d00001

diff --git a/scripts/system/more/more.html b/scripts/system/more/more.html
new file mode 100644
index 0000000000..dfb71244e6
--- /dev/null
+++ b/scripts/system/more/more.html
@@ -0,0 +1,225 @@
+<!--
+//  more.html
+//
+//  Created by Keb Helion, February 2020.
+//  Copyright 2020 Project Athena and contributors.
+//
+//  Distributed under the Apache License, Version 2.0.
+//  See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
+-->
+<!DOCTYPE html>
+<html>
+	<head>
+		<meta charset="UTF-8">
+		<script type="text/javascript" src="https://kasenvr.github.io/community-apps/applications/metadata.js"></script>
+		<script>
+			//Parameters
+			function findGetParameter(parameterName) {
+				var result = null,
+					tmp = [];
+				var items = location.search.substr(1).split("&");
+				for (var index = 0; index < items.length; index++) {
+					tmp = items[index].split("=");
+					if (tmp[0] === parameterName) result = decodeURIComponent(tmp[1]);
+				}
+				return result;
+			}
+	
+			var offset = findGetParameter("offset");
+			if(offset === null){offset = 0;}
+			offset = parseInt(offset);
+			
+			var perpage = findGetParameter("perpage");
+			if(perpage === null){perpage = 25;}
+			perpage = parseInt(perpage);
+			
+			var search = findGetParameter("search");
+			if(search === null){search = "";}			
+	
+			//Search
+			function doSearch(keyword){
+				location.href = "more.html?offset=0&search=" + encodeURI(keyword);
+			}
+
+			function clearSearch(){
+				location.href = "more.html?offset=0";
+			}
+			
+			//Paths
+			var currentPath = window.location.protocol + "//" + window.location.host + window.location.pathname;
+			var rootPath = "https://kasenvr.github.io/community-apps/applications/";
+			
+			//Running scripts 
+			var buttonList = [];
+			
+			function requestRunningScriptData() {
+				var readyEvent = {
+					"action": "requestRunningScriptData"
+				};
+				EventBridge.emitWebEvent(JSON.stringify(readyEvent));
+			}
+
+			EventBridge.scriptEventReceived.connect(function(message){
+				//update the buttons
+				buttonList.forEach(function(item){
+					var btn = "";
+					if (message.indexOf(item.url) != -1) {
+						//Means already running
+						btn = "<button class='uninstall' onclick='uninstall(" + '"' + item.url + '"' + ", " + '"' + item.id + '"' + ");'>Uninstall</button>";
+					} else {
+						//Means not already installed
+						btn = "<button class='install' onclick='install(" + '"' + item.url + '"' + ", " + '"' + item.id + '"' + ");'>Install</button>";
+					}
+					
+					document.getElementById(item.id).innerHTML = btn;
+				});
+            });
+
+			function install(script, btnId){
+				//then change btn appearence
+				var btn = "<button class='processing' >Processing...</button>";
+				document.getElementById(btnId).innerHTML = btn;
+
+				//Action
+				var readyEvent = {
+					"action": "installScript",
+					"script": script
+				};
+				
+				EventBridge.emitWebEvent(JSON.stringify(readyEvent));
+
+			}
+
+			function uninstall(script, btnId){
+				//then change btn appearence
+				var btn = "<button class='processing' >Processing...</button>";
+				document.getElementById(btnId).innerHTML = btn;
+				
+				//Action
+				var readyEvent = {
+					"action": "uninstallScript",
+					"script": script
+				};
+                
+				EventBridge.emitWebEvent(JSON.stringify(readyEvent));
+			}
+            
+		</script>    
+        
+        <link href="https://fonts.googleapis.com/css?family=Merriweather|Quicksand:400,700&display=swap" rel="stylesheet">
+        <link href="css/styles.css" rel="stylesheet">
+        
+	</head>
+	<body><form name = "searchbar">
+		<h1 class="mainTitle">Add more functionalities...</h1>
+		<p class="mainDesc">Want to add your own app? Read the <a href="../web/index.html">guide</a>!</p>
+		<table style = "width:100%;">
+			<tr >
+				<td style = "vertical-align:middle; text-align:left;">
+					<table>
+						<tr>
+							<td style = "vertical-align:middle; text-align:left;">
+								<div class = "searchbox">
+									<input class = "searchtextbox" name = "searchtextbox" size = "26" maxlength="32"> <a href="#" onclick='clearSearch();'><img src="del-x-16.png"></a>
+								</div>
+							</td>
+							<td style = "vertical-align:middle; text-align:left;">
+								<a href = "#" onclick = 'doSearch(document.searchbar.searchtextbox.value);'><img src="search-32.png"></a>
+							</td>
+						</tr>
+					</table>
+				</td>
+				<td style = "vertical-align:middle; text-align:right;">
+					<div id = 'pager_top'  style = "vertical-align: middle;"></div>
+				</td>				
+			</tr>
+		</table>
+		</form><br>
+		<div id = "data"></div>
+		<div style="width:98%; text-align:right;"><div style = "vertical-align: middle;" id = 'pager_footer'></div>		
+		
+		<script>
+			document.searchbar.searchtextbox.value = search;
+
+			function DisplayApp(item) {
+				pageContent = pageContent + "<a name = '" + window.btoa(item.name) + "'><table class='item'><tr>";
+				pageContent = pageContent + "<td><div class='iconContainer'><img src='" + rootPath + item.icon + "' style='width:50px;'><br><font class = 'caption'>" + item.caption + "</font></div></td>";
+				var btn = "";
+				var absoluteJsFile = rootPath + item.jsfile;
+			
+				var btn = "<button class='install' onclick = 'install(" + '"' + absoluteJsFile + " ," + window.btoa(item.name) + '"' + ");'>Install</button>";
+				var btndata = {
+					"url": absoluteJsFile,
+					"id": window.btoa(item.name)
+					};
+				buttonList.push(btndata);
+				
+				pageContent = pageContent + "<td><font class='appname'>" + item.name + "<br></font><font class = 'appdesc'>" + item.description + "<br></font><div id = '"+ window.btoa(item.name) +"' align='right'>" + btn + "</div></td>";
+				pageContent = pageContent + "</tr></table><br><br>";				
+			}
+
+			var counterDir = -1;
+			var counterDisp = 0;
+			var index = 0;
+			var lowItem = "";
+			var needNext = false;
+			var pageContent = "";
+			
+			for (index = 0; index < metadata.applications.length; index++){
+				lowItem = metadata.applications[index].name.toLowerCase();
+				if (lowItem.indexOf(search.toLowerCase()) != -1 && metadata.applications[index].isActive == true){ 
+					counterDir = counterDir + 1;
+					if ((counterDir >= offset) && (counterDir < (offset + perpage))){
+						DisplayApp(metadata.applications[index]);
+						counterDisp = counterDisp + 1;
+					}
+					if (counterDir >= (offset + perpage)){
+						needNext = true;
+						break;
+					}
+				}
+			}
+			
+			//pager
+            
+			function pagetoPrevious(){
+				offset = offset - perpage;
+				if (offset < 0){
+					offset = 0;
+				}
+				location.href = "more.html?offset=" + offset + "&perpage=" + perpage + "&search=" + encodeURI(search);			
+			}
+			
+			function pagetoNext(){
+				offset = offset + perpage;
+				location.href = "more.html?offset=" + offset + "&perpage=" + perpage + "&search=" + encodeURI(search);
+			}
+			
+			var pagerPrevious = "<a href='#' onclick='pagetoPrevious();'><img src='minus-16.png'></a>";
+			if (offset <= 0){
+				pagerPrevious = "<img src='blank_minus-16.png'>";
+			}
+			
+			var pagerNext = "<a href='#' onclick='pagetoNext();'><img src='plus-16.png'></a>";
+			if (needNext == false){
+				pagerNext = "<img src='blank_plus-16.png'>";
+			}			
+			
+			var countA = offset + 1;
+			
+			var countB = offset + counterDisp;
+			
+			var pagerHtml = pagerPrevious + "<font class='pager'>&nbsp;&nbsp;" + countA + " - " + countB  + "&nbsp;&nbsp;</font>" + pagerNext; 
+
+			if (counterDisp > 0 ){
+				document.getElementById("pager_top").innerHTML = pagerHtml;
+				document.getElementById("data").innerHTML = pageContent;
+				document.getElementById("pager_footer").innerHTML = pagerHtml;
+			}else{
+				document.getElementById("data").innerHTML = "<hr><div align='center'><font class='noresult'><br><br><br><br>Sorry, no result found.<br><br><br><br><br><br></font></div><hr>";
+			}
+			
+			requestRunningScriptData();
+		</script>
+	</body>
+</html>
\ No newline at end of file
diff --git a/scripts/system/more/plus-16.png b/scripts/system/more/plus-16.png
new file mode 100644
index 0000000000000000000000000000000000000000..69358477577fc740e55a1eaeb1016a5ee2608ac2
GIT binary patch
literal 393
zcmWm5O(=t500;2@GqVlb>$zZ|yqBF22gGFF@v<#VGr~A{O(=@_*4p&=%4djt<U}qG
z@^w%yQj9W6xhzhLG!hpFq9%vm@i%2FH)*01qXB3vX3-9S2S8N{00Zzk07SXWjvjzJ
z|3{Wnxg-GcR-@Gj9L#xsDwh6Nli6+s+&X}b0^ebPy#Rfgz^er4*MNl1#Rgv~fUre0
zRt?@ef5YLzGeO4SbZR9~A>thji7qANw=5q#tCePN9y)G_J)eDT?5*CnyYs*^ZR0UQ
zczSb@XYKar$=wwJ8GB=~!gR{adPC*}OOEWlcC_iiv&k;#2bDc)`k~N=3_1=fzB`$5
z0vFKuei-LAO}8)<^`92=I@7qVU}j}#C|IecLRyx&=0ey}ohx|tXCR07YC?3U*&v|8
zPv+TIE=?IOJ<E1x%jEPh!mua>tqUc#n0cgo#9cp;O$KPL%y+pNf3j8WA#$3d^cauS
dZNZGXI1xkvYgv84{-fg?04yct;%<>N@(0+PeTo18

literal 0
HcmV?d00001

diff --git a/scripts/system/more/search-32.png b/scripts/system/more/search-32.png
new file mode 100644
index 0000000000000000000000000000000000000000..8d4bb5daa275e2eef7527df92eab589cff339940
GIT binary patch
literal 1584
zcmWlYZB$eD9e{s-ZW01qlkg%YG|2S@43?2l#2Ey+2~l~MqD81q0!S*#goX)}QMpMt
z5o(I81x1FE(ALsuF(9okFeIRb4hvXhf|A2~JCH)><`G1b9X>oCpD)ijPg#82-ZhRM
zjsUPGGD4OB0K_Ux1_0z17XA+a9C9L(a{-)OS3yuy%LM@12a;F`KvQ|q%DbPh8tD-U
zu>ghM0F(w`*#<z(0-O>7%*g?Qs{z(!f0lB84*>m2q)c+4;7QtRn=P!1w4)#mIqP&f
zfjTB8#yC1U>Ot0gD*dmSfrT!wJiVEnZ+pF*OHX#0{)mD!$sm!QnK^PiJ$*{(>-%GW
zXQy;+iuKLPg^8i72gl+r1%LOfLxl~I)}U%W2?6TEXbp-K3a`id`}_NlkKcLy>cv?U
zS)K)fnyRWQ#5Lky@2hLSsho*gEVfxK@FSveM$a}kH;-Joa>YlO(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