Created
October 8, 2019 10:24
-
-
Save GitHub30/59e002a5f57a4df0decbd7ac23290f77 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name 新しいスクリプト 421815 | |
// @version 1 | |
// @match https://wiki.greasespot.net/GM.xmlHttpRequest | |
// @match http://example.com/ | |
// @grant GM.xmlHttpRequest | |
// ==/UserScript== | |
function get(url) { | |
return new Promise(resolve => { | |
GM.xmlHttpRequest({ | |
method: "GET", | |
url, | |
onload: resolve | |
}); | |
}) | |
} | |
(async () => { | |
const response = await get('https://www.google.com/') | |
alert(response.responseText) | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks