مجله اینترنتی تخصصی نرم افزار
مرور برچسب

نرم افزار BPMS

) ) { return pathname + '/'; } return pathname; } _shouldAddTrailingSlash( pathname ) { return ( this.config.usesTrailingSlash && ! pathname.endsWith( '/' ) && ! this.regex.fileExt.test( pathname ) ); } /** * Checks if the given link element is okay to process. * * @private * * @param object url URL parts object. * * @returns {boolean} */ _isLinkOk( url ) { if ( null === url || typeof url !== 'object' ) { return false; } return ( ! this.prefetched.has( url.href ) && url.origin === this.config.siteUrl // is an internal document. && url.href.indexOf( '?' ) === -1 // not a query string. && url.href.indexOf( '#' ) === -1 // not an anchor. && ! this.regex.excludeUris.test( url.href ) // not excluded. && ! this.regex.images.test( url.href ) // not an image. ); } /** * Named static constructor to encapsulate how to create the object. */ static run() { // Bail out if the configuration not passed from the server. if ( typeof RocketPreloadLinksConfig === 'undefined' ) { return; } const browser = new RocketBrowserCompatibilityChecker( { capture: true, passive: true } ); const instance = new RocketPreloadLinks( browser, RocketPreloadLinksConfig ); instance.init(); } } RocketPreloadLinks.run(); /* ]]> */