Skip to content

Instantly share code, notes, and snippets.

@devbyray
Created August 13, 2021 11:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save devbyray/84e6fd4b402ebcd703d161f01f16986a to your computer and use it in GitHub Desktop.
Save devbyray/84e6fd4b402ebcd703d161f01f16986a to your computer and use it in GitHub Desktop.
Get Curation Status from Medium Post
(() => {
if(__APOLLO_STATE__) {
let result = null
for(const [key, value] of Object.entries(__APOLLO_STATE__)) {
if(key.startsWith('Post') && value.hasOwnProperty('curationStatus')) {
result = 'Curation status: ' + value.curationStatus;
console.log(result)
}
}
result = result ?? 'No Curation information is found 😢'
alert(result)
} else {
alert('Are you sure you are currently on a Medium post?')
}
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment