summaryrefslogtreecommitdiff
path: root/public/js/extra.js
diff options
context:
space:
mode:
authorWu Cheng-Han2015-09-25 18:18:21 +0800
committerWu Cheng-Han2015-09-25 18:18:21 +0800
commitbb13a98c1318b50375f5887e7edab9a9e11da287 (patch)
tree796b409e419d3a9b8b4c5ad9bde6247341cf2ec0 /public/js/extra.js
parent2463a5126bee7d03093825dee8911ac87a8fae61 (diff)
Updated postProcess, link should open in new window or tab
Diffstat (limited to 'public/js/extra.js')
-rw-r--r--public/js/extra.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/public/js/extra.js b/public/js/extra.js
index 2930ec25..3ad78c9a 100644
--- a/public/js/extra.js
+++ b/public/js/extra.js
@@ -207,6 +207,10 @@ function postProcess(code) {
result.find("iframe").replaceWith(function () {
return "<noiframe>" + $(this).html() + "</noiframe>"
});
+ //link should open in new window or tab
+ result.find('a:not([target])').attr('target', '_blank');
+ return result;
+}
}
}
}