glib-web 0.6.5 → 0.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,6 +32,13 @@ export default {
32
32
  this.youtubeId = this.extractYoutubeId(this.spec.text);
33
33
  console.log("Detected Youtube ID", this.youtubeId);
34
34
  }
35
+ // Set all links to be openWeb or open in a new tab by default
36
+ if (!this.spec.openWeb) {
37
+ let anchors = document.querySelectorAll('a');
38
+ for (let i = 0; i < anchors.length; i++) {
39
+ anchors[i].setAttribute('target', '_blank')
40
+ }
41
+ }
35
42
  },
36
43
  // From https://gist.github.com/takien/4077195
37
44
  extractYoutubeId(url) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glib-web",
3
- "version": "0.6.5",
3
+ "version": "0.6.9",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {