Created
April 25, 2019 13:44
-
-
Save Amzd/e00b5f6f1eacfb279ed81ea777320689 to your computer and use it in GitHub Desktop.
Filter by gamemode in the feed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Tracker Network Filter Feed | |
// @namespace https://rocketleague.tracker.network | |
// @version 0.1 | |
// @description Filters to gamemode in the feed. | |
// @author You | |
// @match https://rocketleague.tracker.network/live* | |
// @grant GM_addStyle | |
// ==/UserScript== | |
$(function() { | |
'use strict'; | |
$(".aside .card-heading").append('<div id="feed-tools" class="card-tools"></div>') | |
$("#feed-tools").append('<a href="javascript:;" class="feed-filter">1v1</a>') | |
$("#feed-tools").append('<a href="javascript:;" class="feed-filter">2v2</a>') | |
$("#feed-tools").append('<a href="javascript:;" class="feed-filter">3v3</a>') | |
$("#feed-tools").append('<a href="javascript:;" class="feed-filter"><i class="ion ion-close"></i></a>') | |
function filter(f) { | |
$('.aside .feed-item .message').hide().filter(":contains('"+f+"')").show(); | |
$('.aside .feed-item').hide().filter(":contains('"+f+"')").show(); | |
} | |
$('.feed-filter').click(function(){ | |
filter(this.text) | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment