Support » Plugin: Page Links To » Issue with your new-tab.min.js file

  • Resolved pako69

    (@pako69)


    Hi

    This file: wp-content/plugins/page-links-to/js/new-tab.min.js has “min” in his filename to it’s supposed to be minified but it is not, so caching plugin do no try to minify it.

    And what are those stranges comment in the same file:

    //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJqcy9uZXctdGFiLmpzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtjQ0FBLFNBQUMsR0FFQSxJQUFNLEVBQVMsU0FBQSxHQUNkLElBQU0sRUFBYyxZQUNELE1BQWYsRUFBRyxTQUFtQixFQUFZLEtBQUssRUFBRyxhQUFhLFdBQzFELEVBQUcsYUFBYSxTQUFVLFVBQzFCLEVBQUcsYUFBYSxPQUFRLEVBQUcsYUFBYSxRQUFRLFFBQVEsRUFBYSxPQUt2RSxFQUFFLGlCQUFpQixRQUFTLFNBQUEsR0FBQSxPQUFLLEVBQU8sRUFBRSxVQUcxQyxFQUFFLGlCQUFpQixtQkFBb0IsV0FFdEMsSUFEQSxJQUFNLEVBQVUsRUFBRSxxQkFBcUIsS0FDOUIsRUFBSSxFQUFHLEVBQUksRUFBUSxPQUFRLElBQ25DLEVBQU8sRUFBUSxNQWpCbEIsQ0FvQkciLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIihmdW5jdGlvbigpe2Z1bmN0aW9uIHIoZSxuLHQpe2Z1bmN0aW9uIG8oaSxmKXtpZighbltpXSl7aWYoIWVbaV0pe3ZhciBjPVwiZnVuY3Rpb25cIj09dHlwZW9mIHJlcXVpcmUmJnJlcXVpcmU7aWYoIWYmJmMpcmV0dXJuIGMoaSwhMCk7aWYodSlyZXR1cm4gdShpLCEwKTt2YXIgYT1uZXcgRXJyb3IoXCJDYW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udExpc3RlbmVyKCdET01Db250ZW50TG9hZGVkJywgKCkgPT4ge1xuXHRcdGNvbnN0IGFuY2hvcnMgPSBkLmdldEVsZW1lbnRzQnlUYWdOYW1lKCdBJyk7XG5cdFx0Zm9yIChsZXQgaSA9IDA7IGkgPCBhbmNob3JzLmxlbmd0aDsgaSsrKSB7XG5cdFx0XHRuZXdUYWIoYW5jaG9yc1tpXSk7XG5cdFx0fVxuXHR9KTtcbn0pKGRvY3VtZW50KTtcbiJdfQ==

    Please fix it. Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mark Jaquith

    (@markjaquith)

    1. You’re right — that file is meant to be minimized, but it isn’t. I’ll look into that.
    2. The strange comment is a source map. This maps the contents of this file back to the contents of the original file that was used to generate it. Why was a different file used to generate it? Well, ideally #1 gets fixed and it’s minimized, so this enables better debugging. But also, I use modern JavaScript techniques that not all browsers yet support, so there is a build process which “compiles” the JavaScript down to JavaScript that older browsers can understand. This source mapping also helps correspond the original lines to the generated lines.

    Plugin Author Mark Jaquith

    (@markjaquith)

    Opened an issue for the minification problem:

    https://github.com/markjaquith/page-links-to/issues/71

    Thread Starter pako69

    (@pako69)

    Hello
    Why resolved? Maybe I’m wrong but I do not see any updates about that issue?
    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Issue with your new-tab.min.js file’ is closed to new replies.