|
6 | 6 | * Made by SoapBox Innovations, Inc. |
7 | 7 | * Under MIT License |
8 | 8 | */ |
9 | | -!function($, window, document, undefined) { |
| 9 | +!function($, window, document) { |
10 | 10 | "use strict"; |
11 | 11 | function Linkified(element, options) { |
12 | 12 | this._defaults = defaults, this.element = element, this.setOptions(options), this.init(); |
|
73 | 73 | }, $.fn.linkify.Constructor = Linkified, $(window).on("load", function() { |
74 | 74 | $("[data-linkify]").each(function() { |
75 | 75 | var $target, $this = $(this), target = $this.attr("data-linkify"), options = { |
76 | | - tagName: $this.attr("data-linkify-tagname") || undefined, |
77 | | - newLine: $this.attr("data-linkify-newline") || undefined, |
78 | | - target: $this.attr("data-linkify-target") || undefined, |
79 | | - linkClass: $this.attr("data-linkify-linkclass") || undefined |
| 76 | + tagName: $this.attr("data-linkify-tagname"), |
| 77 | + newLine: $this.attr("data-linkify-newline"), |
| 78 | + target: $this.attr("data-linkify-target"), |
| 79 | + linkClass: $this.attr("data-linkify-linkclass") |
80 | 80 | }; |
| 81 | + for (var option in options) "undefined" == typeof options[option] && delete options[option]; |
81 | 82 | $target = "this" === target ? $this : $this.find(target), $target.linkify(options); |
82 | 83 | }); |
83 | 84 | }), $("body").on("click", ".linkified", function() { |
|
0 commit comments