Suppress (maybe harmless) error on no postcontrols selector (happens on catalog)

This commit is contained in:
8chan 2015-04-21 07:11:33 -07:00
parent a4312e7d16
commit 402a246174

View File

@ -318,9 +318,11 @@ var script_settings = function(script_name) {
function init() { function init() {
// store highlighted text for citeReply() // store highlighted text for citeReply()
if (document.querySelector('form[name="postcontrols"]') !== null) {
document.querySelector('form[name="postcontrols"]').addEventListener('mouseup', function (e) { document.querySelector('form[name="postcontrols"]').addEventListener('mouseup', function (e) {
sessionStorage.quoteClipboard = window.getSelection().toString(); sessionStorage.quoteClipboard = window.getSelection().toString();
}); });
}
// just enable jquery, almost every script requires it by now. more and more main.js functions are going to start requiring it // just enable jquery, almost every script requires it by now. more and more main.js functions are going to start requiring it
$('.post-table-options').css('display', 'none'); $('.post-table-options').css('display', 'none');