-
-
Save zivce/3b20993852ea97ea4259b1c05b9d09ef to your computer and use it in GitHub Desktop.
Get Curation Status from Medium Post
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
(() => { | |
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