Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

Rename SimpleDOMParser to NativeSimpleDOMParser #1113

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/bg/background.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<script src="/bg/js/options.js"></script>
<script src="/bg/js/profile-conditions.js"></script>
<script src="/bg/js/request-builder.js"></script>
<script src="/bg/js/simple-dom-parser.js"></script>
<script src="/bg/js/native-simple-dom-parser.js"></script>
<script src="/bg/js/text-source-map.js"></script>
<script src="/bg/js/translator.js"></script>

Expand Down
6 changes: 3 additions & 3 deletions ext/bg/js/audio-downloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

/* global
* SimpleDOMParser
* NativeSimpleDOMParser
*/

class AudioDownloader {
Expand Down Expand Up @@ -109,7 +109,7 @@ class AudioDownloader {
});
const responseText = await response.text();

const dom = new SimpleDOMParser(responseText);
const dom = new NativeSimpleDOMParser(responseText);
for (const row of dom.getElementsByClassName('dc-result-row')) {
try {
const audio = dom.getElementByTagName('audio', row);
Expand Down Expand Up @@ -149,7 +149,7 @@ class AudioDownloader {
});
const responseText = await response.text();

const dom = new SimpleDOMParser(responseText);
const dom = new NativeSimpleDOMParser(responseText);
try {
const audio = dom.getElementById(`audio_${expression}:${reading}`);
if (audio !== null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

class SimpleDOMParser {
class NativeSimpleDOMParser {
constructor(content) {
this._document = new DOMParser().parseFromString(content, 'text/html');
}
Expand Down