git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
login: optionally redirect to ?goto
[minimedit.git]
/
edit.js
diff --git
a/edit.js
b/edit.js
index 4cdc5725cba194d67726c8a8519dfe17d4e944ab..21028dc6f4b7d65c8584429e0cc0267c8af5b0b4 100644
(file)
--- a/
edit.js
+++ b/
edit.js
@@
-77,10
+77,7
@@
CKEDITOR.on('instanceCreated', function (event) {
// add edit link to menu
var pagebody = document.getElementsByClassName('static')[0];
if (pagebody) {
// add edit link to menu
var pagebody = document.getElementsByClassName('static')[0];
if (pagebody) {
- var editlink = document.createElement('a');
- editlink.style.cursor = 'pointer';
- editlink.appendChild(document.createTextNode('Wijzig'));
- editlink.href = '#edit';
+ var editlink = document.querySelector('a[href="#edit"]');
editlink.onclick = function (e) {
editlink.style.fontWeight = 'bold';
editlink.href = '';
editlink.onclick = function (e) {
editlink.style.fontWeight = 'bold';
editlink.href = '';
@@
-95,6
+92,5
@@
if (pagebody) {
if (window.location.hash == '#edit') {
editlink.onclick();
}
if (window.location.hash == '#edit') {
editlink.onclick();
}
- document.querySelector('header ul').appendChild(editlink);
}
}