Last active
August 17, 2017 21:17
-
-
Save astroza/ff89cc940b33ad9319bf3ae8ae6da641 to your computer and use it in GitHub Desktop.
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
// ==UserScript== | |
// @name Autoclip | |
// @namespace http://nedmedia.io | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author F | |
// @update https://gist.github.com/astroza/ff89cc940b33ad9319bf3ae8ae6da641/raw/17f3e11fda0f4c7831bc232870c4971165f9bf42/autoclip-wordpress.user.js | |
// @match http://*/wp/wp-admin/post.php?post=* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
function $x(xpath) { | |
return document.evaluate(xpath, document, null, XPathResult.ANY_TYPE, null ); | |
} | |
var category = `programas-podcasts>${$x('//*[@id="programas-podcastschecklist"]//input[@checked="checked"]').iterateNext().value}>${$x('//*[@id="_thumbnail_id"]').iterateNext().value}`; | |
var update = document.getElementsByClassName('update-nag')[0]; | |
update.innerHTML = `<h3>Autoclip Reference ID: ${category}</h3>` + update.innerHTML; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment