Wrap it in document.ready
$(document).ready(function () {
$('#context_external_tools_select li:contains("BOX")').remove();
});
Most likely the reason this works in the console is you're executing the code after the DOM has fully loaded. If this doesn't work with document.ready, you need to check your console for errors.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.