Skip to content

Commit

Permalink
XMLHttpRequest改为异步
Browse files Browse the repository at this point in the history
  • Loading branch information
zgao264 committed Dec 6, 2022
1 parent 0c4f029 commit 89f2668
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Func().then(res => {

function getMp4Url(url){
var xhr = new XMLHttpRequest();
xhr.open("GET", url , false);
xhr.open("GET", url , true);
xhr.onload = function(){
if (xhr.readyState === 4 && xhr.status === 200){
mp4UrlJson = JSON.parse(xhr.responseText);
Expand Down

1 comment on commit 89f2668

@Jucasan22
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jucasan22

Please sign in to comment.