Created
September 27, 2014 10:09
-
-
Save webflo/21ce7a95af3ab10dad1e to your computer and use it in GitHub Desktop.
Tag it!
This file contains hidden or 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
var tags = jQuery('#edit-taxonomy-vocabulary-9-und').val(); | |
tags = jQuery.map(tags.split(', '), jQuery.trim); | |
if (jQuery.inArray('Amsterdram2014', tags) === -1) { | |
jQuery('#edit-taxonomy-vocabulary-9-und').val(jQuery('#edit-taxonomy-vocabulary-9-und').val() + ', Amsterdram2014'); | |
} |
This file contains hidden or 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
<p><em>You did it!</em> You can run your bookmarklet by clicking: <a class="bookmarklet" href="javascript:(function()%7Bvar%20tags%20%3D%20jQuery('%23edit-taxonomy-vocabulary-9-und').val()%3Btags%20%3D%20jQuery.map(tags.split('%2C%20')%2C%20jQuery.trim)%3Bif%20(jQuery.inArray('Amsterdram2014'%2C%20tags)%20%3D%3D%3D%20-1)%20%7BjQuery('%23edit-taxonomy-vocabulary-9-und').val(jQuery('%23edit-taxonomy-vocabulary-9-und').val()%20%2B%20'%2C%20Amsterdram2014')%3B%7D%7D)()">this link</a><br><br>and here is the code:</p> | |
// Source: http://mrcoles.com/bookmarklet/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment