Permalink
Browse files

Added an inline script to detect installation as a plugin.

Script sniffs for "/_plugin/" in location.href. If found it will
automatically populate the host and port fields and simulate clicking
the "GO!" button.
  • Loading branch information...
1 parent 55142c7 commit 501199dc06127cbce59e25442e6cd8614beb152e @bd808 bd808 committed with Feb 3, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 index.html
View
@@ -300,6 +300,15 @@
<script src="js/lib/parseUri/parseuri.js" type="text/javascript" charset="utf-8"></script>
<script src="js/charts.js" type="text/javascript" charset="utf-8"></script>
<script src="js/bigdesk.js" type="text/javascript" charset="utf-8"></script>
+<script type="text/javascript">
+ $(function() {
+ if (location.href.indexOf("/_plugin/") != -1) {
+ document.forms['form'].host.value = location.hostname;
+ document.forms['form'].port.value = location.port;
+ $("#go").click();
+ }
+ });
+</script>
</body>
</html>

0 comments on commit 501199d

Please sign in to comment.