Skip to content

Commit 19e8ee0

Browse files
authored
Update smartChute.user.js
1 parent a5b3d7f commit 19e8ee0

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/smartChute.user.js

+15-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name SmartChute
3-
// @version 19.11.19
3+
// @version 19.11.30
44
// @description BitChute.com Enhancer. Adds missing features. Makes you feel warm.
55
// @license MIT
66
// @author S-Marty
@@ -63,6 +63,7 @@ var use_Square_Icons = true;
6363
var hide_Donation_Bar = true;
6464
var hide_Cookie_Notice = true;
6565
var hide_Signup_Notice = true;
66+
var homepage_go_to_all = true;
6667
/* End Editable options */
6768

6869
(function() {
@@ -333,7 +334,18 @@ var hide_Signup_Notice = true;
333334
if (BC.settings.hidecarousel) { // The only way to pause this thing
334335
if (qs('#carousel')) qs('#carousel').innerHTML = '';
335336
}
336-
applyBlacklist('#listing-all > div.row > div');
337+
338+
if (homepage_go_to_all) {
339+
let preferAll = qs("ul.nav-tabs-list li a[href='#listing-all']");
340+
if (preferAll !== null && preferAll.parentNode.className.indexOf('active') ==-1) {
341+
var click = new MouseEvent('click', {
342+
bubbles: true,
343+
cancelable: true
344+
});
345+
preferAll.dispatchEvent(click);
346+
}
347+
}
348+
else applyBlacklist('#listing-popular > div.row > div');
337349
setChannelFeed('remove');
338350
}
339351
createSmartyButton();
@@ -386,7 +398,7 @@ var hide_Signup_Notice = true;
386398
card.setAttribute('title', name +' is blacklisted ☺');
387399
card.classList.add('userisblacklisted')
388400
}
389-
else {
401+
else if (! card.parentNode.querySelector('.add-to-blacklist')) {
390402
let button = blacklistButton();
391403
card.parentNode.appendChild(button);
392404
button.addEventListener('click', function(e){

0 commit comments

Comments
 (0)