parent
c1b47e4b23
commit
e3d1c6588d
|
@ -225,7 +225,9 @@ function initStyleData() {
|
||||||
const id = params.get('id');
|
const id = params.get('id');
|
||||||
const createEmptyStyle = () => ({
|
const createEmptyStyle = () => ({
|
||||||
id: null,
|
id: null,
|
||||||
name: '',
|
name: params.get('domain') ||
|
||||||
|
tryCatch(() => new URL(params.get('url-prefix')).hostname) ||
|
||||||
|
'',
|
||||||
enabled: true,
|
enabled: true,
|
||||||
sections: [
|
sections: [
|
||||||
Object.assign({code: ''},
|
Object.assign({code: ''},
|
||||||
|
|
|
@ -106,7 +106,10 @@ function createSourceEditor(style) {
|
||||||
}
|
}
|
||||||
const DEFAULT_CODE = `
|
const DEFAULT_CODE = `
|
||||||
/* ==UserStyle==
|
/* ==UserStyle==
|
||||||
@name ${t('usercssReplaceTemplateName') + ' - ' + new Date().toLocaleString()}
|
@name ${
|
||||||
|
style.name ||
|
||||||
|
t('usercssReplaceTemplateName') + ' - ' + new Date().toLocaleString()
|
||||||
|
}
|
||||||
@namespace github.com/openstyles/stylus
|
@namespace github.com/openstyles/stylus
|
||||||
@version 0.1.0
|
@version 0.1.0
|
||||||
@description A new userstyle
|
@description A new userstyle
|
||||||
|
|
Loading…
Reference in New Issue
Block a user