感谢 Ashwin 的帮助,这最终对我有用!
// ==UserScript==
// @name Imgur - Upvote all comments
// @namespace http://mydomain.com/
// @version 0.1
// @description inserts a button into the html of the Imgur gallery page that allows you to upvote every comment
// @match http://imgur.com/gallery/*
// @copyright 2013+, stackoverflow
// ==/UserScript==
$(document).ready(function() {
$('body').append('<input type="button" value="upvote all comments" id="upallcomments">')
$('#upallcomments').css('position', 'fixed').css('top', 0).css('left', 0);
$('#upallcomments').click(function(){
$('[title="like"]').click();
});
});