From 6706ba811e962982f27b3e173bb45ffe10844e1a Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Tue, 2 Feb 2021 04:40:41 +0000 Subject: [PATCH] development version for urgent bugfix test in response to Forum (2.5.4d1) git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2466893 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- class/init.php | 71 +- class/task.php | 16 +- css/public.css | 2 +- footnotes.php | 4 +- js/jquery.tools.js | 936 +++++++++++++++---------- js/jquery.tools.min.js | 14 +- readme.txt | 31 +- templates/dashboard/editor-button.html | 88 +-- 8 files changed, 677 insertions(+), 485 deletions(-) diff --git a/class/init.php b/class/init.php index b9acca2..001e527 100644 --- a/class/init.php +++ b/class/init.php @@ -5,16 +5,17 @@ * @filesource * @author Stefan Herndler * @since 1.5.0 12.09.14 10:56 + * * - * Edited: - * 1.6.5 replace deprecated function create_function() - * 2.0.0 add jQueryUI from Cloudflare 2020-10-26T1907+0100 - * 2.0.3 add versioning of public.css for cache busting 2020-10-29T1413+0100 - * 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100 - * 2.1.4 automate passing version number for cache busting 2020-11-30T0646+0100 - * 2.1.4 optionally enqueue an extra style sheet 2020-12-04T2231+0100 + * @edit 1.6.5 Bugfix: Improve widgets registration, thanks to @felipelavinz code contribution + * @edit 1.6.5 Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution + * @edit 2.0.0 Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution + * @edit 2.0.3 add versioning of public.css for cache busting 2020-10-29T1413+0100 + * @edit 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100 + * @edit 2.1.4 automate passing version number for cache busting 2020-11-30T0646+0100 + * @edit 2.1.4 optionally enqueue an extra style sheet 2020-12-04T2231+0100 * - * Last modified: 2020-12-08T1927+0100 + * Last modified: 2021-01-31T0755+0100 */ @@ -40,9 +41,16 @@ class MCI_Footnotes { * * @author Stefan Herndler * @since 1.5.0 + * + * + * Bugfix: Improve widgets registration, thanks to @felipelavinz code contribution + * @since 1.6.5 + * + * @contributor @felipelavinz + * @source https://github.com/media-competence-institute/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793 */ public function run() { - // register language + // register language MCI_Footnotes_Language::registerHooks(); // register Button hooks MCI_Footnotes_WYSIWYG::registerHooks(); @@ -68,13 +76,26 @@ class MCI_Footnotes { * @author Stefan Herndler * @since 1.5.0 * - * Edited for 1.6.5: replaced deprecated function create_function() + * + * Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution + * @since 1.6.5 + * + * @contributor @felipelavinz + * @source https://github.com/media-competence-institute/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793 + * + * @reporter @psykonevro + * @bugreport https://wordpress.org/support/topic/bug-function-create_function-is-deprecated/ + * @bugreport https://wordpress.org/support/topic/deprecated-function-create_function-14/ + * + * @reporter @daliasued + * @bugreport https://wordpress.org/support/topic/deprecated-function-create_function-14/#post-13312853 * - * Contributed by Felipe Lavín Z. Thankfully acknowledged. - * - * create_function() was deprecated in PHP 7.2: - * - * See also: + * create_function() was deprecated in PHP 7.2.0 and removed in PHP 8.0.0. + * @link https://www.php.net/manual/en/function.create-function.php + * + * The fix is to move add_action() above into run(), + * and use the bare register_widget() here. + * And declare initializeWidgets() public, not private. */ public function initializeWidgets() { register_widget("MCI_Footnotes_Widget_ReferenceContainer"); @@ -107,6 +128,7 @@ class MCI_Footnotes { * @author Stefan Herndler * @since 1.5.0 * + * @edit 2.0.0 Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution * Updated for v2.0.0 adding jQuery UI * Updated for v2.0.4 by adding jQuery UI from WordPress following @check2020de: * @@ -121,7 +143,13 @@ class MCI_Footnotes { // These are only enqueued if the jQuery tooltips are enabled. // If alternative tooltips are enabled, these libraries are not needed. // Scroll animation doesn’t seem to need even jQuery Core or it gets it from elsewhere. - + //* @edit 2.0.0 add jQueryUI from Cloudflare 2020-10-26T1907+0100 + //* @edit 2.0.3 add versioning of public.css for cache busting 2020-10-29T1413+0100 + //* @edit 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100 + //* @edit 2.1.4 automate passing version number for cache busting 2020-11-30T0646+0100 + //* @edit 2.1.4 optionally enqueue an extra style sheet 2020-12-04T2231+0100 + //*/ + if (!MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE))) { // enqueue the jQuery plugin registered by WordPress: @@ -134,9 +162,16 @@ class MCI_Footnotes { wp_enqueue_script( 'jquery-ui-tooltip' ); // enqueue jQuery Tools: - // redacted jQuery.browser, completed minification; added versioning 2020-11-18T2150+0100 + // redacted jQuery.browser, completed minification; + // see full header in js/jquery.tools.js + // added versioning 2020-11-18T2150+0100 // not use '-js' in the handle, is appended automatically - wp_enqueue_script('mci-footnotes-jquery-tools', plugins_url('footnotes/js/jquery.tools.min.js'), array(), '1.2.7redacted'); + wp_enqueue_script( + 'mci-footnotes-jquery-tools', + plugins_url('footnotes/js/jquery.tools.min.js'), + array(), + '1.2.7.redacted.2' + ); // Alternatively, fetch jQuery UI from cdnjs.cloudflare.com: diff --git a/class/task.php b/class/task.php index 9a003a9..5acbe7a 100644 --- a/class/task.php +++ b/class/task.php @@ -79,15 +79,10 @@ * * @edit 2.3.0 optional hard links in referrers and backlinks for AMP compatibility, thanks to @psykonevro bug report, thanks to @martinneumannat code contribution * @edit 2.3.0 swap Custom CSS migration Boolean from 'migration complete' to 'show legacy' 2020-12-27T1243+0100 - * * @edit 2.4.0 syntax validation for balanced footnote start and end tags 2021-01-01T0227+0100 - * * @edit 2.4.0 initialize scroll offset variable to 34 as a more robust default, thanks to @lukashuggenberg 2021-01-04T0504+0100 - * * @edit 2.4.0 set empty reference container label to NNBSP to make it more robust, thanks to @lukashuggenberg 2021-01-04T0504+0100 - * * @edit 2.4.0 Performance: optimize template load and process according to settings, thanks to @misfist code contribution - * * @edit 2.4.0 initialize hard link address as empty to fix undefined variable bug, thanks to @a223123131 2021-01-04T1622+0100 * * @edit 2.5.0 Shortcode syntax validation: exclude certain cases involving scripts, thanks to @andreasra 2021-01-07T0824+0100 @@ -96,10 +91,7 @@ * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ * * @edit 2.5.0 Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution - * @link https://wordpress.org/support/topic/footnote-doesntwork-on-category-page/ - * * @edit 2.5.1 Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report - * @link https://wordpress.org/support/topic/footnotes-use-in-popup-maker/ * * @edit 2.5.2 Tooltips: ability to display dedicated content, thanks to @jbj2199 bug report * @@ -339,8 +331,8 @@ class MCI_Footnotes_Task { * @edit 2.0.9 removed the_post hook after its default enabling caused multiple issues * @edit 2.1.1 Dashboard: priority level setting for the_content hook, thanks to @imeson bug report * @edit 2.1.2 Dashboard: priority level settings for all other hooks, thanks to @nikelaos bug report - * @edit 2.5.0 support the term_description hook, thanks to @vitaefit bug report, thanks to @misfist code contribution - * @edit 2.5.1 support the pum_popup_content hook, thanks to @squatcher bug report + * @edit 2.5.0 Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution + * @edit 2.5.1 Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report */ public function registerHooks() { @@ -376,7 +368,7 @@ class MCI_Footnotes_Task { * * @link https://codex.wordpress.org/Plugin_API/#Hook_in_your_Filter * - * Setting the_content priority to "10" instead of PHP_INT_MAX i.e. 9223372036854775807 + * Setting the_content priority to 10 instead of PHP_INT_MAX i.e. 9223372036854775807 * makes the footnotes reference container display beneath the post and above other * features added by other plugins, e.g. related post lists and social buttons. * @@ -420,8 +412,8 @@ class MCI_Footnotes_Task { * HOOK FOR CATEGORY PAGES * * Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution - * @datestamp 2021-01-05T1402+0100 * @since 2.5.0 + * @datestamp 2021-01-05T1402+0100 * * @reporter @vitaefit * @bugreport https://wordpress.org/support/topic/footnote-doesntwork-on-category-page/ diff --git a/css/public.css b/css/public.css index a15069f..5f42d3e 100755 --- a/css/public.css +++ b/css/public.css @@ -8,7 +8,7 @@ /* Version: 2.5.4 -Last modified: 2021-01-26T0831+0100 +Last modified: 2021-01-30T0113+0100 Classes recommended for Custom CSS are listed in diff --git a/footnotes.php b/footnotes.php index 5a70627..7e59fc6 100755 --- a/footnotes.php +++ b/footnotes.php @@ -4,12 +4,12 @@ Plugin URI: https://wordpress.org/plugins/footnotes/ Description: time to bring footnotes to your website! footnotes are known from offline publishing and everybody takes them for granted when reading a magazine. Author: Mark Cheret - Version: 2.5.4d0 + Version: 2.5.4d1 Author URI: http://cheret.de/plugins/footnotes-2/ Text Domain: footnotes Domain Path: /languages */ -define( 'C_STR_FOOTNOTES_VERSION', '2.5.4d0' ); +define( 'C_STR_FOOTNOTES_VERSION', '2.5.4d1' ); /* Copyright 2020 Mark Cheret (email: mark@cheret.de) diff --git a/js/jquery.tools.js b/js/jquery.tools.js index f3c74d6..26d48a3 100644 --- a/js/jquery.tools.js +++ b/js/jquery.tools.js @@ -1,6 +1,7 @@ -/*! +// To enable PHPDOC syntax highlighting, switch your editor to PHP. - * - * Removed usage of jQuery browser check function 2020-11-12T0127+0100 - * ==> this is version 1.2.7redacted - * See also on the Forum: , - * lastly - * - * #1 (54) This was only a tweak to adjust width and height in Internet Explorer. - * - * #2 (226) This was only for very old Internet Explorer (older than IE8). - * - * #3 (266) This was only about a naming convention of Firefox: 'DOMMouseScroll' vs 'mousewheel', - * or 'mousemove' in very old Firefox (older than v1.9). - * When making jQuery.browser optional, an 'if(a.browser)' condition was added around. - * - * #4 (293) This disabled fade-in for Internet Explorer other than FadeIE. - * - * #5 (296) This disabled fade-out for Internet Explorer other than FadeIE. - * - * #6 (420) This disabled slide-fade for Internet Explorer. - * Browsers not supporting an effect simply don’t execute it, they won’t throw an error. - * - * Halfways minified file. Last modified: 2020-12-04T2140+0100 + * This is a halfways minified file. + * Make sure to sync the version number in class/init.php: + * @version 1.2.7.redacted.2 + * + * @lastmodified 2021-02-01T0411+0100 + * @accountable @pewgeuges + * + * @edit 2.0.0 Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution + * @edit 2.0.0 Update: Libraries: jQuery Tools: add condition whether deprecated function jQuery.browser() exists, thanks to @vonpiernik code contribution + * @edit 2.1.1 Update: Libraries: jQuery Tools: redact (comment out) all 6 instances of deprecated function jQuery.browser(), thanks to @bjrnet21 @cconser @vyassuresh @spaceling @widecast @olivlyon @maxident bug reports + * @edit 2.1.1 Bugfix: Libraries: jQuery Tools: complete minification + * @edit 2.5.4 Update: Libraries: jQuery Tools: replace deprecated function jQuery.isFunction(), thanks to @a223123131 bug report + * @edit 2.5.4 Bugfix: Libraries: jQuery Tools: replace discouraged double equals sign with recommended triple equals sign */ + +/** + * UPGRADE TO JQUERY UI AND FIX DEPRECATED FUNCTION jQuery.browser() + * + * Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution + * Update: Libraries: jQuery Tools: add condition whether deprecated function jQuery.browser() exists, thanks to @vonpiernik code contribution + * @since 2.0.0 + * @datestamp 2020-10-26T2005+0100 + * @accountable @pewgeuges + * + * @contributor @vonpiernik + * @source https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13456762 + * + * @reporter @rajinderverma + * @bugreport https://wordpress.org/support/topic/tooltip-hover-not-showing/ + * + * @reporter @ericcorbett2 + * @bugreport https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13324142 + * + * @reporter @honlapdavid + * @bugreport https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13355421 + * + * @reporter @mmallett + * @bugreport https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13445437 + * + * Fixing jQuery.browser was needed alongside adding the jQueryUI library to debug the tooltips. + */ + +/** + * FUNCTION jQuery.browser() DEPRECATED, REDACTED (COMMENTED OUT) + * + * Update: Libraries: jQuery Tools: redact (comment out) all 6 instances of deprecated function jQuery.browser(), thanks to @bjrnet21 @cconser @vyassuresh @spaceling @widecast @olivlyon @maxident bug reports + * @since 2.1.1 + * @datestamp 2020-11-12T0127+0100 + * @accountable @pewgeuges + * + * @reporter @bjrnet21 + * @bugreport https://wordpress.org/support/topic/after-wp-5-5-upgrade-jquery-is-deprecated/ + * + * @reporter @cconser + * @bugreport https://wordpress.org/support/topic/after-wp-5-5-upgrade-jquery-is-deprecated/#post-13262355 + * + * @reporter @vyassuresh + * @bugreport https://wordpress.org/support/topic/after-wp-5-5-upgrade-jquery-is-deprecated/#post-13263019 + * + * @reporter @spaceling + * @bugreport https://wordpress.org/support/topic/after-wp-5-5-upgrade-jquery-is-deprecated/#post-13309712 + * + * @reporter @widecast + * @bugreport https://wordpress.org/support/topic/after-wp-5-5-upgrade-jquery-is-deprecated/#post-13414243 + * + * @reporter @olivlyon + * @bugreport https://wordpress.org/support/topic/after-wp-5-5-upgrade-jquery-is-deprecated/#post-13472896 + * + * @reporter @maxident + * @bugreport https://wordpress.org/support/topic/jquery-issues-13/ + * + * The function jQuery.browser() cannot be easily replaced like other deprecated functions. + * The recommended fix is to use Modernizr instead. + * @link https://api.jquery.com/jquery.browser/ + * @link https://modernizr.com/ + * + * Yet in jQuery Tools, as used for footnote tooltips, it turns out that the + * addressed cases are negligible, as can easily be checked in the full list + * of the comments evaluating each instance where jQuery.browser was used in + * the script and has been redacted (commented out for traceability). Please + * check the numbered comment blocks in the script body above each instance: + * + * #1 This was only a tweak to adjust width and height in Internet Explorer. + * + * #2 This was only for very old Internet Explorer (older than IE8). + * + * #3 This was only about a naming convention of Firefox: 'DOMMouseScroll' vs 'mousewheel', + * or 'mousemove' in very old Firefox (older than v1.9). + * When making jQuery.browser optional, an 'if(a.browser)' condition was added around. + * + * #4 This disabled fade-in for Internet Explorer other than FadeIE. + * + * #5 This disabled fade-out for Internet Explorer other than FadeIE. + * + * #6 This disabled slide-fade for Internet Explorer. + * Browsers not supporting an effect simply don’t execute it, they won’t throw an error. + */ + (function (a) { - a.tools = a.tools || {version: "v1.2.7"}; - var b; - b = a.tools.expose = {conf: {maskId: "exposeMask", loadSpeed: "slow", closeSpeed: "fast", closeOnClick: !0, closeOnEsc: !0, zIndex: 9998, opacity: .8, startOpacity: 0, color: "#fff", onLoad: null, onClose: null}}; - function c() { - /*if (a.browser && a.browser.msie) { - var b = a(document).height(), c = a(window).height(); - return[window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, b - c < 20 ? c : b] - }*/ - return[a(document).width(), a(document).height()] - } + a.tools = a.tools || {version: "v1.2.7"}; + var b; + b = a.tools.expose = {conf: {maskId: "exposeMask", loadSpeed: "slow", closeSpeed: "fast", closeOnClick: !0, closeOnEsc: !0, zIndex: 9998, opacity: .8, startOpacity: 0, color: "#fff", onLoad: null, onClose: null}}; + function c() { - function d(b) { - if (b)return b.call(a.mask) - } + /** + * REDACT DEPRECATED jQuery.browser() + * + * #1 This was only a tweak to adjust width and height in Internet Explorer. + */ - var e, f, g, h, i; - a.mask = {load: function (j, k) { - if (g)return this; - typeof j == "string" && (j = {color: j}), j = j || h, h = j = a.extend(a.extend({}, b.conf), j), e = a("#" + j.maskId), e.length || (e = a("
").attr("id", j.maskId), a("body").append(e)); - var l = c(); - e.css({position: "absolute", top: 0, left: 0, width: l[0], height: l[1], display: "none", opacity: j.startOpacity, zIndex: j.zIndex}), j.color && e.css("backgroundColor", j.color); - if (d(j.onBeforeLoad) === !1)return this; - j.closeOnEsc && a(document).on("keydown.mask", function (b) { - b.keyCode == 27 && a.mask.close(b) - }), j.closeOnClick && e.on("click.mask", function (b) { - a.mask.close(b) - }), a(window).on("resize.mask", function () { - a.mask.fit() - }), k && k.length && (i = k.eq(0).css("zIndex"), a.each(k, function () { - var b = a(this); - /relative|absolute|fixed/i.test(b.css("position")) || b.css("position", "relative") - }), f = k.css({zIndex: Math.max(j.zIndex + 1, i == "auto" ? 0 : i)})), e.css({display: "block"}).fadeTo(j.loadSpeed, j.opacity, function () { - a.mask.fit(), d(j.onLoad), g = "full" - }), g = !0; - return this - }, close: function () { - if (g) { - if (d(h.onBeforeClose) === !1)return this; - e.fadeOut(h.closeSpeed, function () { - d(h.onClose), f && f.css({zIndex: i}), g = !1 - }), a(document).off("keydown.mask"), e.off("click.mask"), a(window).off("resize.mask") - } - return this - }, fit: function () { - if (g) { - var a = c(); - e.css({width: a[0], height: a[1]}) - } - }, getMask: function () { - return e - }, isLoaded: function (a) { - return a ? g == "full" : g - }, getConf: function () { - return h - }, getExposed: function () { - return f - }}, a.fn.mask = function (b) { - a.mask.load(b); - return this - }, a.fn.expose = function (b) { - a.mask.load(b, this); - return this - } + /*if (a.browser && a.browser.msie) { + var b = a(document).height(), c = a(window).height(); + return[window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, b - c < 20 ? c : b] + }*/ + return[a(document).width(), a(document).height()] + } + + function d(b) { + if (b)return b.call(a.mask) + } + + var e, f, g, h, i; + a.mask = {load: function (j, k) { + if (g)return this; + + /** + * EQUALS SIGN IN JAVASCRIPT + * + * Bugfix: Libraries: jQuery Tools: replace discouraged double equals sign with recommended triple equals sign + * @since 2.5.4 + * @datestamp 2021-01-27T1955+0100 + * @accountable @pewgeuges + * + * 23 instances (27 less 4 already triple), first below, next was already + * All instances checked whether '==' has the semantics of '===', though. + * @see Douglas Crockford, JavaScript: The Good Parts + */ + + typeof j === "string" && (j = {color: j}), j = j || h, h = j = a.extend(a.extend({}, b.conf), j), e = a("#" + j.maskId), e.length || (e = a("
").attr("id", j.maskId), a("body").append(e)); + var l = c(); + e.css({position: "absolute", top: 0, left: 0, width: l[0], height: l[1], display: "none", opacity: j.startOpacity, zIndex: j.zIndex}), j.color && e.css("backgroundColor", j.color); + if (d(j.onBeforeLoad) === !1)return this; + j.closeOnEsc && a(document).on("keydown.mask", function (b) { + b.keyCode === 27 && a.mask.close(b) + }), j.closeOnClick && e.on("click.mask", function (b) { + a.mask.close(b) + }), a(window).on("resize.mask", function () { + a.mask.fit() + }), k && k.length && (i = k.eq(0).css("zIndex"), a.each(k, function () { + var b = a(this); + /relative|absolute|fixed/i.test(b.css("position")) || b.css("position", "relative") + }), f = k.css({zIndex: Math.max(j.zIndex + 1, i === "auto" ? 0 : i)})), e.css({display: "block"}).fadeTo(j.loadSpeed, j.opacity, function () { + a.mask.fit(), d(j.onLoad), g = "full" + }), g = !0; + return this + }, close: function () { + if (g) { + if (d(h.onBeforeClose) === !1)return this; + e.fadeOut(h.closeSpeed, function () { + d(h.onClose), f && f.css({zIndex: i}), g = !1 + }), a(document).off("keydown.mask"), e.off("click.mask"), a(window).off("resize.mask") + } + return this + }, fit: function () { + if (g) { + var a = c(); + e.css({width: a[0], height: a[1]}) + } + }, getMask: function () { + return e + }, isLoaded: function (a) { + return a ? g === "full" : g + }, getConf: function () { + return h + }, getExposed: function () { + return f + }}, a.fn.mask = function (b) { + a.mask.load(b); + return this + }, a.fn.expose = function (b) { + a.mask.load(b, this); + return this + } })(jQuery); + (function () { - var a = document.all, b = "http://www.adobe.com/go/getflashplayer", c = typeof jQuery == "function", d = /(\d+)[^\d]+(\d+)[^\d]*(\d*)/, e = {width: "100%", height: "100%", id: "_" + ("" + Math.random()).slice(9), allowfullscreen: !0, allowscriptaccess: "always", quality: "high", version: [3, 0], onFail: null, expressInstall: null, w3c: !1, cachebusting: !1}; - window.attachEvent && window.attachEvent("onbeforeunload", function () { - __flash_unloadHandler = function () { - }, __flash_savedUnloadHandler = function () { - } - }); - function f(a, b) { - if (b)for (var c in b)b.hasOwnProperty(c) && (a[c] = b[c]); - return a - } + var a = document.all, b = "http://www.adobe.com/go/getflashplayer", c = typeof jQuery === "function", d = /(\d+)[^\d]+(\d+)[^\d]*(\d*)/, e = {width: "100%", height: "100%", id: "_" + ("" + Math.random()).slice(9), allowfullscreen: !0, allowscriptaccess: "always", quality: "high", version: [3, 0], onFail: null, expressInstall: null, w3c: !1, cachebusting: !1}; + window.attachEvent && window.attachEvent("onbeforeunload", function () { + __flash_unloadHandler = function () { + }, __flash_savedUnloadHandler = function () { + } + }); + function f(a, b) { + if (b)for (var c in b)b.hasOwnProperty(c) && (a[c] = b[c]); + return a + } - function g(a, b) { - var c = []; - for (var d in a)a.hasOwnProperty(d) && (c[d] = b(a[d])); - return c - } + function g(a, b) { + var c = []; + for (var d in a)a.hasOwnProperty(d) && (c[d] = b(a[d])); + return c + } - window.flashembed = function (a, b, c) { - typeof a == "string" && (a = document.getElementById(a.replace("#", ""))); - if (a) { - typeof b == "string" && (b = {src: b}); - return new j(a, f(f({}, e), b), c) - } - }; - var h = f(window.flashembed, {conf: e, getVersion: function () { - var a, b; - try { - b = navigator.plugins["Shockwave Flash"].description.slice(16) - } catch (c) { - try { - a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"), b = a && a.GetVariable("$version") - } catch (e) { - try { - a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"), b = a && a.GetVariable("$version") - } catch (f) { - } - } - } - b = d.exec(b); - return b ? [b[1], b[3]] : [0, 0] - }, asString: function (a) { - if (a === null || a === undefined)return null; - var b = typeof a; - b == "object" && a.push && (b = "array"); - switch (b) { - case"string": - a = a.replace(new RegExp("([\"\\\\])", "g"), "\\$1"), a = a.replace(/^\s?(\d+\.?\d*)%/, "$1pct"); - return"\"" + a + "\""; - case"array": - return"[" + g(a,function (a) { - return h.asString(a) - }).join(",") + "]"; - case"function": - return"\"function()\""; - case"object": - var c = []; - for (var d in a)a.hasOwnProperty(d) && c.push("\"" + d + "\":" + h.asString(a[d])); - return"{" + c.join(",") + "}" - } - return String(a).replace(/\s/g, " ").replace(/\'/g, "\"") - }, getHTML: function (b, c) { - b = f({}, b); - var d = ""; - b.width = b.height = b.id = b.w3c = b.src = null, b.onFail = b.version = b.expressInstall = null; - for (var e in b)b[e] && (d += ""); - var g = ""; - if (c) { - for (var i in c)if (c[i]) { - var j = c[i]; - g += i + "=" + encodeURIComponent(/function|object/.test(typeof j) ? h.asString(j) : j) + "&" - } - g = g.slice(0, -1), d += "" - } - d += ""; - return d - }, isSupported: function (a) { - return i[0] > a[0] || i[0] == a[0] && i[1] >= a[1] - }}), i = h.getVersion(); + window.flashembed = function (a, b, c) { + typeof a === "string" && (a = document.getElementById(a.replace("#", ""))); + if (a) { + typeof b === "string" && (b = {src: b}); + return new j(a, f(f({}, e), b), c) + } + }; + var h = f(window.flashembed, {conf: e, getVersion: function () { + var a, b; + try { + b = navigator.plugins["Shockwave Flash"].description.slice(16) + } catch (c) { + try { + a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"), b = a && a.GetVariable("$version") + } catch (e) { + try { + a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"), b = a && a.GetVariable("$version") + } catch (f) { + } + } + } + b = d.exec(b); + return b ? [b[1], b[3]] : [0, 0] + }, asString: function (a) { + if (a === null || a === undefined)return null; + var b = typeof a; + b === "object" && a.push && (b = "array"); + switch (b) { + case"string": + a = a.replace(new RegExp("([\"\\\\])", "g"), "\\$1"), a = a.replace(/^\s?(\d+\.?\d*)%/, "$1pct"); + return"\"" + a + "\""; + case"array": + return"[" + g(a,function (a) { + return h.asString(a) + }).join(",") + "]"; + case"function": + return"\"function()\""; + case"object": + var c = []; + for (var d in a)a.hasOwnProperty(d) && c.push("\"" + d + "\":" + h.asString(a[d])); + return"{" + c.join(",") + "}" + } + return String(a).replace(/\s/g, " ").replace(/\'/g, "\"") + }, getHTML: function (b, c) { + b = f({}, b); + var d = ""; + b.width = b.height = b.id = b.w3c = b.src = null, b.onFail = b.version = b.expressInstall = null; + for (var e in b)b[e] && (d += ""); + var g = ""; + if (c) { + for (var i in c)if (c[i]) { + var j = c[i]; + g += i + "=" + encodeURIComponent(/function|object/.test(typeof j) ? h.asString(j) : j) + "&" + } + g = g.slice(0, -1), d += "" + } + d += ""; + return d + }, isSupported: function (a) { + return i[0] > a[0] || i[0] === a[0] && i[1] >= a[1] + }}), i = h.getVersion(); - function j(c, d, e) { - if (h.isSupported(d.version))c.innerHTML = h.getHTML(d, e); else if (d.expressInstall && h.isSupported([6, 65]))c.innerHTML = h.getHTML(f(d, {src: d.expressInstall}), {MMredirectURL: location.href, MMplayerType: "PlugIn", MMdoctitle: document.title}); else { - c.innerHTML.replace(/\s/g, "") || (c.innerHTML = "

Flash version " + d.version + " or greater is required

" + (i[0] > 0 ? "Your version is " + i : "You have no flash plugin installed") + "

" + (c.tagName == "A" ? "

Click here to download latest version

" : "

Download latest version from here

"), c.tagName == "A" && (c.onclick = function () { - location.href = b - })); - if (d.onFail) { - var g = d.onFail.call(this); - typeof g == "string" && (c.innerHTML = g) - } - } - a && (window[d.id] = document.getElementById(d.id)), f(this, {getRoot: function () { - return c - }, getOptions: function () { - return d - }, getConf: function () { - return e - }, getApi: function () { - return c.firstChild - }}) - } + function j(c, d, e) { + if (h.isSupported(d.version))c.innerHTML = h.getHTML(d, e); else if (d.expressInstall && h.isSupported([6, 65]))c.innerHTML = h.getHTML(f(d, {src: d.expressInstall}), {MMredirectURL: location.href, MMplayerType: "PlugIn", MMdoctitle: document.title}); else { + c.innerHTML.replace(/\s/g, "") || (c.innerHTML = "

Flash version " + d.version + " or greater is required

" + (i[0] > 0 ? "Your version is " + i : "You have no flash plugin installed") + "

" + (c.tagName === "A" ? "

Click here to download latest version

" : "

Download latest version from here

"), c.tagName === "A" && (c.onclick = function () { + location.href = b + })); + if (d.onFail) { + var g = d.onFail.call(this); + typeof g === "string" && (c.innerHTML = g) + } + } + a && (window[d.id] = document.getElementById(d.id)), f(this, {getRoot: function () { + return c + }, getOptions: function () { + return d + }, getConf: function () { + return e + }, getApi: function () { + return c.firstChild + }}) + } - c && (jQuery.tools = jQuery.tools || {version: "v1.2.7"}, jQuery.tools.flashembed = {conf: e}, jQuery.fn.flashembed = function (a, b) { - return this.each(function () { - jQuery(this).data("flashembed", flashembed(this, a, b)) - }) - }) + c && (jQuery.tools = jQuery.tools || {version: "v1.2.7"}, jQuery.tools.flashembed = {conf: e}, jQuery.fn.flashembed = function (a, b) { + return this.each(function () { + jQuery(this).data("flashembed", flashembed(this, a, b)) + }) + }) })(); + (function (a) { - var b, c, d, e; - a.tools = a.tools || {version: "v1.2.7"}, a.tools.history = {init: function (g) { - e || (/*a.browser && a.browser.msie && a.browser.version < "8" ? c || (c = a("