Skip to content

Instantly share code, notes, and snippets.

Capybara.add_selector :record do
xpath { |record| XPath.css("#" + ActionController::RecordIdentifier.dom_id(record)) }
match { |record| record.is_a?(ActiveRecord::Base) }
end
@banderson623
banderson623 / userscript.js
Last active January 30, 2023 21:27
Use native notification center for Slack in fluid.app
var clickOverrides = function(){
// Automatically mark ALL as read and scroll to it
// when clicking on a channel (stared or normal)
$('#channel-list, #starred-list').on('click',function(){
TS.ui.forceMarkAllRead();
TS.ui.scrollMsgsSoFirstUnreadMsgIsInView();
});
};