summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-12-14 22:56:38 -0500
committerGitHub <noreply@github.com>2020-12-14 22:56:38 -0500
commit7926821c48ad512b0c9bd2420216a36fe2237e4f (patch)
tree054019bb183a15f5939c7fcdb8add13d3ef01bd1
parente29c7527938ab37fa90668d5ad9537e4f4a31e67 (diff)
Rename SimpleDOMParser to NativeSimpleDOMParser (#1113)
-rw-r--r--ext/bg/background.html2
-rw-r--r--ext/bg/js/audio-downloader.js6
-rw-r--r--ext/bg/js/native-simple-dom-parser.js (renamed from ext/bg/js/simple-dom-parser.js)2
3 files changed, 5 insertions, 5 deletions
diff --git a/ext/bg/background.html b/ext/bg/background.html
index f42a411d..e139514d 100644
--- a/ext/bg/background.html
+++ b/ext/bg/background.html
@@ -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>
diff --git a/ext/bg/js/audio-downloader.js b/ext/bg/js/audio-downloader.js
index 77cd7294..ddddfe18 100644
--- a/ext/bg/js/audio-downloader.js
+++ b/ext/bg/js/audio-downloader.js
@@ -16,7 +16,7 @@
*/
/* global
- * SimpleDOMParser
+ * NativeSimpleDOMParser
*/
class AudioDownloader {
@@ -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);
@@ -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) {
diff --git a/ext/bg/js/simple-dom-parser.js b/ext/bg/js/native-simple-dom-parser.js
index 258b1f76..2aa4134d 100644
--- a/ext/bg/js/simple-dom-parser.js
+++ b/ext/bg/js/native-simple-dom-parser.js
@@ -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');
}