MediaWiki:Common.js: Difference between revisions
From Emmy The Robot Fandom Wiki
Content added Content deleted
No edit summary |
No edit summary |
||
Line 13: | Line 13: | ||
searchInput.setAttribute('type', 'text'); |
searchInput.setAttribute('type', 'text'); |
||
searchInput.setAttribute('id', 'mediawiki-text-parser-input'); |
searchInput.setAttribute('id', 'mediawiki-text-parser-input'); |
||
searchInput.setAttribute('placeholder', 'Type to |
searchInput.setAttribute('placeholder', 'Type to search1'); |
||
document.getElementById('mw-content-text').insertBefore(searchInput, document.getElementById('mw-content-text').firstChild); |
document.getElementById('mw-content-text').insertBefore(searchInput, document.getElementById('mw-content-text').firstChild); |
||
Line 21: | Line 21: | ||
// Get all paragraphs in the content area |
// Get all paragraphs in the content area |
||
var paragraphs = document.querySelectorAll ('table.wikitable.sortable.mw-datatable.jquery-tablesorter tr'); |
var paragraphs = document.querySelectorAll ('table.wikitable.sortable.mw-datatable.jquery-tablesorter tr:not(:first-child)'); |
||
// Loop through each paragraph |
// Loop through each paragraph |