Update puread files.

This commit is contained in:
Kenshin 2019-04-13 18:39:53 +08:00
parent 9bcfdb62f5
commit 8c317d8bef
2 changed files with 4 additions and 6 deletions

View File

@ -31,17 +31,15 @@ export default class AdapteSite {
* Set url
*/
SetURL( value ) {
/*
const uri = util.getLocation( value );
// Clone util.getURI() source
const name = (pathname) => {
pathname = pathname != "/" && pathname.endsWith("/") ? pathname = pathname.replace( /\/$/, "" ) : pathname;
return pathname.replace( /\/[%@#.~a-zA-Z0-9_-]+$|^\/$/g, "" );
},
path = name( uri.pathname );
this.url = `${ uri.protocol }//${ uri.hostname }${ path }/`;
*/
host_href = value;
path = name( uri.pathname );
this.url = `${ uri.protocol }//${ uri.hostname }${ path }/`;
host_href = value;
}
/**

View File

@ -350,7 +350,7 @@ function commbeautify( name, $target ) {
newsrc = jianshu ? jianshu : newsrc;
newsrc = sina ? sina : newsrc;
//newsrc = getImgAbsolutePath( newsrc );
if ( newsrc && !src.startsWith( 'http' ) && !src.startsWith( 'data' ) ) {
if ( newsrc && !newsrc.startsWith( 'http' ) && !newsrc.startsWith( 'data' ) ) {
newsrc = getImgAbsolutePath2( newsrc, location.href );
}