From 0f8a409cec504801eb70c8019688e69c7ab9cbe0 Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Sun, 1 Jun 2014 12:21:34 +0200 Subject: [PATCH] Prevent tabs from open in the same tab all the time --- assets/js/contextMenu.js | 12 +++++++----- assets/js/init.js | 2 +- assets/min/main.js | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/assets/js/contextMenu.js b/assets/js/contextMenu.js index c36a385..23bf00b 100644 --- a/assets/js/contextMenu.js +++ b/assets/js/contextMenu.js @@ -86,8 +86,9 @@ contextMenu = { function() { settings.setLogin() }, function() { settings.setSorting() }, function() { settings.setDropboxKey() }, - function() { window.open(lychee.website, "_newtab"); }, - function() { window.open("plugins/check/", "_newtab"); }, + function() { window.open(lychee.website); }, + function() { window.open("plugins/check/"); }, + function() { window.open("plugins/displaylog/"); }, function() { lychee.logout() } ]; @@ -98,8 +99,9 @@ contextMenu = { ["separator", -1], [" About Lychee", 3], [" Diagnostics", 4], + [" Show Log", 5], ["separator", -1], - [" Sign Out", 5] + [" Sign Out", 6] ]; contextMenu.show(items, mouse_x, mouse_y, "right"); @@ -217,7 +219,7 @@ contextMenu = { items; contextMenu.fns = [ - function() { window.open(photo.getDirectLink(),"_newtab") }, + function() { window.open(photo.getDirectLink()) }, function() { photo.getArchive(photoID) } ]; @@ -276,7 +278,7 @@ contextMenu = { function() { photo.share(photoID, 1) }, function() { photo.share(photoID, 2) }, function() { photo.share(photoID, 3) }, - function() { window.open(photo.getDirectLink(),"_newtab") } + function() { window.open(photo.getDirectLink()) } ]; link = photo.getViewLink(photoID); diff --git a/assets/js/init.js b/assets/js/init.js index 27035b4..8c13797 100755 --- a/assets/js/init.js +++ b/assets/js/init.js @@ -20,7 +20,7 @@ $(document).ready(function(){ $(document).on("mouseup", multiselect.getSelection); /* Header */ - $("#hostedwith").on(event_name, function() { window.open(lychee.website,"_newtab") }); + $("#hostedwith").on(event_name, function() { window.open(lychee.website) }); $("#button_signin").on(event_name, lychee.loginDialog); $("#button_settings").on("click", contextMenu.settings); $("#button_share").on(event_name, function(e) { diff --git a/assets/min/main.js b/assets/min/main.js index 0cc105b..7842240 100644 --- a/assets/min/main.js +++ b/assets/min/main.js @@ -2,6 +2,6 @@ function mobileBrowser(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)?!0:!1}function gup(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var b="[\\?&]"+a+"=([^&#]*)",c=new RegExp(b),d=c.exec(window.location.href);return null===d?"":d[1]}!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=a.length,c=ab.type(a);return"function"===c||ab.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}function d(a,b,c){if(ab.isFunction(b))return ab.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return ab.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(hb.test(b))return ab.filter(b,a,c);b=ab.filter(b,a)}return ab.grep(a,function(a){return U.call(b,a)>=0!==c})}function e(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function f(a){var b=ob[a]={};return ab.each(a.match(nb)||[],function(a,c){b[c]=!0}),b}function g(){$.removeEventListener("DOMContentLoaded",g,!1),a.removeEventListener("load",g,!1),ab.ready()}function h(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=ab.expando+Math.random()}function i(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(ub,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:tb.test(c)?ab.parseJSON(c):c}catch(e){}sb.set(a,b,c)}else c=void 0;return c}function j(){return!0}function k(){return!1}function l(){try{return $.activeElement}catch(a){}}function m(a,b){return ab.nodeName(a,"table")&&ab.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function n(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function o(a){var b=Kb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function p(a,b){for(var c=0,d=a.length;d>c;c++)rb.set(a[c],"globalEval",!b||rb.get(b[c],"globalEval"))}function q(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(rb.hasData(a)&&(f=rb.access(a),g=rb.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)ab.event.add(b,e,j[e][c])}sb.hasData(a)&&(h=sb.access(a),i=ab.extend({},h),sb.set(b,i))}}function r(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&ab.nodeName(a,b)?ab.merge([a],c):c}function s(a,b){var c=b.nodeName.toLowerCase();"input"===c&&yb.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}function t(b,c){var d=ab(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:ab.css(d[0],"display");return d.detach(),e}function u(a){var b=$,c=Ob[a];return c||(c=t(a,b),"none"!==c&&c||(Nb=(Nb||ab("