Skip to content

Instantly share code, notes, and snippets.

Last active September 19, 2021 11:59
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Quick-edit “Pencil” link for Blogspot.
var blogId = document.querySelector('link[rel=""]').href.match(/\d+/)[0];
console.log('blogId', blogId);
setTimeout(function() {
document.querySelectorAll('.post-footer').forEach(function(footer) {
var postId = footer.parentElement.querySelector('a').name;
console.log('postId', postId);
var href = '' + blogId + '&postID=' + postId + '&from=pencil';
var a = document.createElement('a');
a.href = href;
a.textContent = 'Pencil';
console.log('Added pencil', a);
}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment