mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 04:36:36 +00:00
fhemweb.js: Open link only in new tab if shift/ctrl/etc is pressed
git-svn-id: https://svn.fhem.de/fhem/trunk@9028 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
4f508166dc
commit
dd0c803593
@ -354,7 +354,9 @@ FW_replaceLink(el)
|
||||
if(ma == null || ma.length == 0 || !ma[2].match(/=(save|set)/)) {
|
||||
ma = attr.match(new RegExp("^"+FW_root)); // Avoid "Connection lost" @iOS
|
||||
if(ma) {
|
||||
$(el).click(function() {
|
||||
$(el).click(function(e) {
|
||||
if(e.shiftKey || e.ctrlKey || e.metaKey) // Open link in window/tab
|
||||
return;
|
||||
FW_leaving = 1;
|
||||
if($(el).attr("target") == "_blank") {
|
||||
window.open(url, '_blank').focus();
|
||||
|
Loading…
x
Reference in New Issue
Block a user