From a893f11ad7b39a04ae16ad14142b9b4525009728 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 3 Mar 2015 10:17:29 -0800 Subject: [PATCH] remove load script from message that used xmpp --- .../example/scripts/loadScriptFromMessage.js | 27 ------------------- 1 file changed, 27 deletions(-) delete mode 100644 examples/example/scripts/loadScriptFromMessage.js diff --git a/examples/example/scripts/loadScriptFromMessage.js b/examples/example/scripts/loadScriptFromMessage.js deleted file mode 100644 index c9d067cc3b..0000000000 --- a/examples/example/scripts/loadScriptFromMessage.js +++ /dev/null @@ -1,27 +0,0 @@ -// -// loadScriptFromMessage.js -// examples -// -// Created by Thijs Wenker on 9/15/14. -// Copyright 2014 High Fidelity, Inc. -// -// Filters script links out of incomming messages and prompts you to run the script. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -//Javascript link RegEX -const JS_LINK_REGEX = /https?:\/\/[^ ]+\.js/i; - -function onIncomingMessage(user, message) { - var script_link = JS_LINK_REGEX.exec(message); - if (script_link == null) { - return; - } - if (Window.confirm("@" + user + " sent the following script:\n" + script_link + "\nwould you like to run it?")) { - Script.load(script_link); - } -} - -GlobalServices.incomingMessage.connect(onIncomingMessage); \ No newline at end of file