Skip to content

Instantly share code, notes, and snippets.

@GitHub30
Created October 8, 2019 10:24
Show Gist options
  • Save GitHub30/59e002a5f57a4df0decbd7ac23290f77 to your computer and use it in GitHub Desktop.
Save GitHub30/59e002a5f57a4df0decbd7ac23290f77 to your computer and use it in GitHub Desktop.
// ==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)
})()
@honwhy
Copy link

honwhy commented Dec 31, 2022

thanks

@honwhy
Copy link

honwhy commented Jan 4, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment