|
423 | 423 | document.getElementById("wiki_format").addEventListener("change", function() { |
424 | 424 | unbindGollumFunctions(); |
425 | 425 |
|
426 | | -Array.forEach(document.querySelectorAll(".comment-form-textarea .function-button"), function(button) { |
| 426 | +Array.prototype.forEach.call(document.querySelectorAll(".comment-form-textarea .function-button"), function(button) { |
427 | 427 | button.removeEventListener("click", functionButtonClick); |
428 | 428 | }); |
429 | 429 | }); |
430 | 430 | } |
431 | 431 |
|
432 | | -Array.forEach(document.querySelectorAll(".comment-form-textarea,.js-comment-field"), function(commentForm) { |
| 432 | +Array.prototype.forEach.call(document.querySelectorAll(".comment-form-textarea,.js-comment-field"), function(commentForm) { |
433 | 433 | var gollumEditor; |
434 | 434 | if (commentForm.classList.contains("GithubCommentEnhancer")) { |
435 | 435 | gollumEditor = commentForm.previousSibling; |
|
442 | 442 | temp.innerHTML = editorHTML; |
443 | 443 | temp.firstElementChild.appendChild(document.getElementById("function-help")); // restore the help button; |
444 | 444 | gollumEditor.replaceChild(temp.querySelector("#gollum-editor-function-buttons"), document.getElementById("gollum-editor-function-buttons")); |
445 | | -Array.forEach(temp.children, function(elm) { |
| 445 | +Array.prototype.forEach.call(temp.children, function(elm) { |
446 | 446 | elm.style.position = "absolute"; |
447 | 447 | elm.style.right = "30px"; |
448 | 448 | elm.style.top = "0"; |
|
474 | 474 | } |
475 | 475 |
|
476 | 476 | if (isGist()) { |
477 | | -Array.forEach(gollumEditor.parentNode.querySelectorAll(".select-menu-button"), function(button) { |
| 477 | +Array.prototype.forEach.call(gollumEditor.parentNode.querySelectorAll(".select-menu-button"), function(button) { |
478 | 478 | button.style.paddingRight = "25px"; |
479 | 479 | }); |
480 | 480 | } |
481 | 481 |
|
482 | | -Array.forEach(gollumEditor.parentNode.querySelectorAll(".function-button"), function(button) { |
| 482 | +Array.prototype.forEach.call(gollumEditor.parentNode.querySelectorAll(".function-button"), function(button) { |
483 | 483 | if (isGist() && button.classList.contains("minibutton")) { |
484 | 484 | button.style.padding = "0px"; |
485 | 485 | button.style.textAlign = "center"; |
|
671 | 671 | }; |
672 | 672 |
|
673 | 673 | function addReplyButtons() { |
674 | | -Array.forEach(document.querySelectorAll(".comment"), function(comment) { |
| 674 | +Array.prototype.forEach.call(document.querySelectorAll(".comment"), function(comment) { |
675 | 675 | var header = comment.querySelector(".timeline-comment-header"), |
676 | 676 | actions = comment.querySelector(".timeline-comment-actions"), |
677 | 677 | newComment = document.querySelector(".timeline-new-comment .comment-form-textarea"); |
|
735 | 735 |
|
736 | 736 | // for inline comments; |
737 | 737 | var files = document.querySelectorAll('.file-code'); |
738 | | -Array.forEach(files, function(file) { |
| 738 | +Array.prototype.forEach.call(files, function(file) { |
739 | 739 | file = file.firstElementChild; |
740 | 740 | new MutationObserver(function(mutations) { |
741 | 741 | mutations.forEach(function(mutation) { |
|
0 commit comments