mirror of https://github.com/joplin/website.git
1 line
1.9 KiB
JavaScript
1 line
1.9 KiB
JavaScript
(()=>{"use strict";var e={5299:function(e,t,o){var n=this&&this.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(r,s){function i(e){try{a(n.next(e))}catch(e){s(e)}}function c(e){try{a(n.throw(e))}catch(e){s(e)}}function a(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,c)}a((n=n.apply(e,t||[])).next())}))},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(o(9698)),i=r(o(9541));window.addEventListener("DOMContentLoaded",(()=>n(void 0,void 0,void 0,(function*(){(0,i.default)()})))),(0,s.default)()},9541:function(e,t,o){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=n(o(395));t.default=()=>{const e=document.querySelectorAll("#screenshots-container");for(const t of e)(0,r.default)(t)}},395:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});const{Carousel:o}=window.bootstrap;t.default=e=>{const t=e.querySelector("#raw-screenshots"),n=t.querySelectorAll("img");if(0===n.length)return void e.remove();const r=e.querySelector("#screenshots-carousel"),s=document.createElement("div");s.classList.add("carousel-inner");let i=!0;for(const e of n){e.remove();const t=document.createElement("div");t.classList.add("carousel-item","screenshot-carousel-item"),i&&t.classList.add("active"),t.appendChild(e),s.appendChild(t),i=!1}r.appendChild(s),t.remove(),n.length>1?new o("#"+r.id):r.classList.add("-single-item")}},9698:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=()=>{const e=new URL(location.href);if("joplin.github.io"===e.host){const t=e.pathname.replace(/^[/]?website-plugin-discovery[/]/,"");location.href=`https://joplinapp.org/plugins/${t}${e.search}${e.hash}`}}}},t={};!function o(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,o),s.exports}(5299)})(); |