remove domain name and root slash from extracted id
This commit is contained in:
parent
67dc0498d7
commit
789c829d26
@ -146,10 +146,11 @@ function loadStyleSheet(sheet, callback, reload, remaining) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function extractId(href) {
|
function extractId(href) {
|
||||||
return href.replace(/^[a-z]+:\/\/?/, '') // Remove protocol
|
return href.replace(/^[a-z]+:\/\/?[^\/]+/, '') // Remove protocol & domain
|
||||||
.replace(/\?.*$/, '') // Remove query
|
.replace(/^\//, '') // Remove root /
|
||||||
.replace(/\.[^\/]+$/, '') // Remove file extension
|
.replace(/\?.*$/, '') // Remove query
|
||||||
.replace(/[^\w-]+/g, '-'); // Replace illegal characters
|
.replace(/\.[^\/]+$/, '') // Remove file extension
|
||||||
|
.replace(/[^\w-]+/g, '-'); // Replace illegal characters
|
||||||
}
|
}
|
||||||
|
|
||||||
function createCSS(styles, sheet, lastModified) {
|
function createCSS(styles, sheet, lastModified) {
|
||||||
|
Loading…
Reference in New Issue
Block a user