"use strict"; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var BareFoot = function () { /** * @param {Object} options [Options to configure the script] * @constructor */ function BareFoot() { var _this = this; var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; _classCallCheck(this, BareFoot); var DEFAULTS = { scope: 'body', divFootnotesQuery: ".footnotes", footnotesQuery: "[id^='fn']", supQuery: 'a[href^="#fnref"]', fnButtonMarkup: "", fnContentMarkup: "
" + fnContent + "
"; // Gotta escape `:` used within a querySelector so JS doesn't think you're looking for a pseudo-element. ref = currentScope.querySelector(fnHrefId.replace(':', '\\:')); footnote = "