summaryrefslogtreecommitdiff
path: root/shader-combo.html
diff options
context:
space:
mode:
authorjules <jules@okfoc.us>2014-02-03 09:21:24 -0500
committerjules <jules@okfoc.us>2014-02-03 09:21:24 -0500
commit24415adb4eff017c07e346826c7d46367ab0fff8 (patch)
tree8b4f032d1f32f67911af626de246b305a4334436 /shader-combo.html
parent93c783752dbaefacd96121f7643d6fcebe8e3693 (diff)
put corner links in a popup
Diffstat (limited to 'shader-combo.html')
-rw-r--r--shader-combo.html31
1 files changed, 22 insertions, 9 deletions
diff --git a/shader-combo.html b/shader-combo.html
index 6d9e0de..9757d50 100644
--- a/shader-combo.html
+++ b/shader-combo.html
@@ -72,12 +72,16 @@ a { color: #00f; }
<div id="header">
<span class="right">
- <a href="http://asdf.us/im/">Photoblaster</a>
- &middot;
- <a href="http://asdf.us/im/gallery/">Gallery</a>
- &middot;
- <a href="http://asdf.us/im/gallery/?tag=shader">Shaders</a>
- <h1 id="logo">&nbsp;shaderblaster&nbsp;&nbsp;</h1>
+ <h1 id="logo">&nbsp;shaderblaster&nbsp;&nbsp;</h1>
+ <button id="toggle-shaders">shaders</button>
+ <button id="toggle-images">images</button>
+ <select id="links">
+ <option value="http://asdf.us/im/">Photoblaster</option>
+ <option value="http://asdf.us/im/gallery/">Gallery</option>
+ <option value="http://asdf.us/im/gallery/?tag=shader">Shaders</option>
+ <option value="">--------------</option>
+ <option selected value="default">links</option>
+ </select>
</span>
<button class="toggle-off">x</button>
<!--
@@ -90,8 +94,6 @@ a { color: #00f; }
<button id="fetch-originals" disabled>originals</button>
<button id="fetch-all">all</button>
-->
- <button id="toggle-shaders">browse shaders</button>
- <button id="toggle-images">browse images</button>
<span class="status"></span>
<span id="shader-api-form" class="form">
@@ -115,7 +117,7 @@ a { color: #00f; }
</div>
<div id="controls">
- <input type="text" id="url">
+ <input type="text" id="url" placeholder="paste a url here">
<input type="text" id="username" placeholder="username">
<input type="text" id="shader-name" placeholder="shader name">
<br>
@@ -259,6 +261,17 @@ function init(){
render()
})
+ $("#links").change(function(e){
+ var url = $(this).val()
+ if (url.match("http://")) {
+ var win = window.open(url, '_blank');
+ if (win == null || typeof(win) == "undefined" || (win == null && win.outerWidth == 0) || (win != null && win.outerHeight == 0) || win.test == "undefined"){
+ window.location.href = url;
+ $(this).val("default")
+ }
+ }
+ })
+
load()
help.init()
user.init()