Skip to content

Instantly share code, notes, and snippets.

@zivce
Forked from devbyray/medium-status.js
Created August 14, 2021 06:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zivce/3b20993852ea97ea4259b1c05b9d09ef to your computer and use it in GitHub Desktop.
Save zivce/3b20993852ea97ea4259b1c05b9d09ef 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