Check for gitea version >= 1.20
and extend line length to 120 chars
This commit is contained in:
parent
64f5bef433
commit
1a98503650
@ -21,5 +21,9 @@ module.exports = {
|
||||
'ecmaVersion': 'latest',
|
||||
},
|
||||
'rules': {
|
||||
'max-len': ['error', {
|
||||
'code': 120,
|
||||
'ignoreTemplateLiterals': true,
|
||||
}],
|
||||
},
|
||||
};
|
||||
|
@ -144,12 +144,12 @@ const saveChanges = (element) => {
|
||||
// Only add the interval if we're on the files diff page
|
||||
// (as on all other pages there is no need for conventional comments)
|
||||
const selector = '.page-content.repository.view.issue.pull.files.diff';
|
||||
if (document.querySelector(selector)) {
|
||||
if (document.querySelector(selector) && editorTemplate) {
|
||||
const templ = document.querySelector('#issue-comment-editor-template');
|
||||
if (templ) {
|
||||
setInterval(function() {
|
||||
document
|
||||
.querySelectorAll(
|
||||
'.field.comment-code-cloud:not([data-semantic-button-initialized])',
|
||||
)
|
||||
.querySelectorAll(`.field.comment-code-cloud:not([data-semantic-button-initialized])`)
|
||||
.forEach(function(note) {
|
||||
note.dataset.semanticButtonInitialized = 'true';
|
||||
note.querySelector('.markup-info').remove();
|
||||
@ -157,3 +157,4 @@ if (document.querySelector(selector)) {
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user