PageSourceSearch

https://bot.rustplus.io/help/assets/js/docs.js?t=09032026

js rustplus.io collected 2026-10-08 05:47:33 UTC 9,543 bytes, 166 lines download raw bytes

1
2$(window).on('load resize', function() {
3   
4    //Add/remove class based on browser size when load/resize
5    var w = $(window).width();
6
7	if(w >= 1200) {
8	    // if larger 
9	    $('#docs-sidebar').addClass('sidebar-visible').removeClass('sidebar-hidden');
10	} else {
11	    // if smaller
12	    $('#docs-sidebar').addClass('sidebar-hidden').removeClass('sidebar-visible');
13	}
14});
15
16$(document).ready(function() {
17
18	/* ====== Toggle Sidebar ======= */
19	
20	$('#docs-sidebar-toggler').on('click', function(){
21		if ( $('#docs-sidebar').hasClass('sidebar-visible') ) {
22			  $("#docs-sidebar").removeClass('sidebar-visible').addClass('sidebar-hidden');
23		} else {
24			  $("#docs-sidebar").removeClass('sidebar-hidden').addClass('sidebar-visible');
25		}
26    });
27
28    /* ====== Activate scrollspy menu ===== */
29    //$('body').scrollspy({target: '#docs-nav', offset: 100});
30
31    /* ===== Gumshoe SrollSpy ===== */
32    /* Ref: https://github.com/cferdinandi/gumshoe  */
33    // Initialize Gumshoe
34    var spy = new Gumshoe('#docs-nav a', {
35	offset: 100 //sticky header height
36    });
37
38    /* ===== Smooth scrolling ====== */
39
40    $('#docs-sidebar a.scrollto').on('click', function(e){
41        //store hash
42        var target = this.hash;
43        e.preventDefault();
44	$('body').scrollTo(target, 800, {offset: -69, 'axis':'y'});
45		
46        //Collapse sidebar after clicking
47        if ($('#docs-sidebar').hasClass('sidebar-visible') && $(window).width() < 1200){
48                $('#docs-sidebar').removeClass('sidebar-visible').addClass('slidebar-hidden');
49        }
50    });
51
52    $('.docs-content a.scrollto').on('click', function(e){
53        //store hash
54        var target = this.hash;
55        e.preventDefault();
56        $('body').scrollTo(target, 800, {offset: -69, 'axis':'y'});
57    });
58
59	/* smooth scrolling on page load if URL has a hash */
60	if(window.location.hash) {
61            var urlhash = window.location.hash;
62            try {
63		$('body').scrollTo(urlhash, 800, {offset: -69, 'axis':'y'});
64            }
65            catch { }
66	}
67	
68	/* Bootstrap lightbox */
69    /* Ref: http://ashleydw.github.io/lightbox/ */
70
71    var imgs = $('*[data-toggle="lightbox"]');
72    imgs.each(function() {
73        var lightbox = new SimpleLightbox($(this), { fadeSpeed: 150 });
74    });
75
76    var search = getParameterByName('search');
77    $(".search-input").on("input.highlight", function() {
78        var searchTerm = $(this).val();
79        $(".docs-content").unmark().mark(searchTerm);
80    }).val(search).trigger("input.highlight");
81    $(".search-btn").click(function() {
82        var mark = $('mark');
83        $('body').scrollTo(mark.first(), 800, {offset: -69, 'axis':'y'});
84    });
85    setTimeout(function() {
86        $(".search-btn").first().trigger('click');
87    }, 0);
88
89    $('#official-links').click(function() {
90        bootbox.alert({
91            title: '<b>RustPlusBot</b> Official Links',
92            message: '<ul><li>Main<ul><li><a href="https://bot.rustplus.io/" target="_blank" title="RustPlusBot website">RustPlusBot website</a></li><li><a href="https://bot.rustplus.io/help/" target="_blank" title="RustPlusBot documentation">RustPlusBot documentation</a></li><li><a href="https://bot-store.rustplus.io/" target="_blank" title="RustPlusBot store">RustPlusBot store</a></li></ul></li><li style="margin-top: 1rem;">Social<ul><li><a href="https://www.reddit.com/r/RustPlusBot/" target="_blank" title="RustPlusBot Subreddit">RustPlusBot Subreddit</a></li><li><a href="https://github.com/javajuice1337/RustPlusBot" target="_blank" title="RustPlusBot GitHub">RustPlusBot GitHub</a></li><li><a href="https://discord.bots.gg/bots/892190942352769075" target="_blank" title="RustPlusBot Bots.gg">RustPlusBot Bots.gg</a></li><li><a href="https://top.gg/bot/892190942352769075" target="_blank" title="RustPlusBot Top.gg">RustPlusBot Top.gg</a></li><li><a href="https://discord.rustrician.io/" target="_blank" title="Rustricity Workshop Discord">Rustricity Workshop Discord</a></li></ul></li><li style="margin-top: 1rem;">Stream Deck<ul><li><a href="https://marketplace.elgato.com/product/rustplusbot-71ff0906-5954-4beb-9837-2c3cbed66fec" target="_blank" title="RustPlusBot Plugin">RustPlusBot Plugin</a></li></ul></li><li style="margin-top: 1rem;">Video<ul><li><a href="https://www.youtube.com/watch?v=6ZcQTe-0Pns" target="_blank" title="RustPlusBot Setup Guide">
92RustPlusBot Setup Guide</a></li><li><a href="https://www.youtube.com/watch?v=ijdQ31TP0hk" target="_blank" title="RustPlusBot Hotel Integration">RustPlusBot Hotel Integration</a></li><li><a href="https://www.youtube.com/watch?v=krdlDosY-sI" target="_blank" title="RustPlusBot Industrial Automated Crafting">RustPlusBot Industrial Automated Crafting</a></li><li><a href="https://www.youtube.com/watch?v=Y8TFu9y1mY0" target="_blank" title="RustPlusBot Smart Automated Furnace">RustPlusBot Smart Automated Furnace</a></li><li><a href="https://www.youtube.com/watch?v=BPMWDo3Q86o" target="_blank" title="RustPlusBot Camera Tricks">RustPlusBot Camera Tricks</a></li><li><a href="https://www.youtube.com/watch?v=nL2nQarQmxU" target="_blank" title="RustPlusBot Camera Station">RustPlusBot Camera Station</a></li></ul><li style="margin-top: 1rem;">Voice<ul><li><a href="/alexa" target="_blank" title="RustPlusBot Alexa Skill">RustPlusBot Alexa Skill</a></li></ul></li><li style="margin-top: 1rem;">Other<ul><li><a href="https://www.rustrician.io/" target="_blank" title="Rustrician.io - RUST Electricity Simulator">
92Rustrician.io - RUST Electricity Simulator</a></li><li><a href="https://store.steampowered.com/app/527440/Rustangelo/" target="_blank" title="Rustangelo - Automatic Sign Painter">Rustangelo - Automatic Sign Painter</a></li><li><a href="https://store.steampowered.com/app/1222580/Rustissimo/" target="_blank" title="Rustissimo - Instruments Concert Creator">Rustissimo - Instruments Concert Creator</a></li><li><a href="http://www.rconlink.io/" target="_blank" title="rconlink - A direct, browser-based RCON console for Rust servers">rconlink - A direct, browser-based RCON console for Rust servers</a></li></ul></li></ul>'
93        });
94        return false;
95    });
96
97    $('.bm-info').click(function() {
98        bootbox.alert({
99            title: 'How to find a player\'s <b>BattleMetrics ID</b>:',
100            message: '<ol><li>Open the BattleMetrics players page for your server</li><li>Find the player in the list</li><li>Click the player name link</li><li>Copy the player ID from the address URL<br/>(example: /players/<b>112233</b>)</li></ol>'
101        });
102        return false;
103    });
104
105    $('.discord-copyid-info').click(function() {
106        bootbox.alert({
107            title: 'How to Copy a Message ID in Discord:',
108            message: '<ol><li><b>Desktop</b>: Click on the “Settings” icon &gt; Click on “Advanced” &gt; Enable “Developer Mode” &gt; Open message &gt; Click on three dots &gt; Click Copy ID</li><li><b>Mobile</b>: Click on the “Profile” icon &gt; Click on “Appearance” &gt; Enable “Developer Mode” &gt; Open message &gt; Long-press the message &gt; Click Copy ID.</li><li>You cannot copy the Message ID unless the Developer mode is enabled.</li></ol>'
109        });
110        return false;
111    });
112
113    $('.plug-cmds input').each(function() {
114        $(this).change(function() {
115            var el = $(this);
116            if (el.is(":checked")) {
117                var target = $('#teamchat-cmds-' + el.attr('tag'));
118                $('.cmds-' + el.attr('tag')).children().each(function() {
119                    var child = $(this).clone();
120                    if (child.is("h5")) {
121                        child.html('<hr>Plugin team chat commands for: <b>' + $(this).parent().parent().children().first().text() + '</b> <a href="#' + $(this).parent().parent().first().attr('id') + '" class="scrollto" title="Go to plugin reference"><i class="fas fa-link"></i></a>');
122                        child.find('a.scrollto').on('click', function(e) {
123                            var target = this.hash;
124                            e.preventDefault();
125                            $('body').scrollTo(target, 800, {offset: -69, 'axis':'y'});
126                        });
127                    }
128                    target.append(child.addClass('cmd-plugin'));
129                    var imgs = child.find('*[data-toggle="lightbox"]');
130                    imgs.each(function() {
131                        var lightbox = new SimpleLightbox($(this), { fadeSpeed: 150 });
132                    });
133                });
134            }
135            else {
136                $('#teamchat-cmds-' + el.attr('tag') + ' .cmd-plugin').remove();
137            }
138        }).prop("checked", false);
139    });
140
141    $('.nav-item').each(function() {
142        this.addEventListener('gumshoeActivate', function() {
143            this.scrollIntoView({ block: "start", behavior: "smooth" });
144        });
145    });
146
147    $.get("doc_date.php", function(data) {
148        if (data && $('.docs-time').attr('tag') != data)
149            $('#outdated-alert').show(100);
150    });
151
152});
153
154function getParameterByName(name)
155{
156    name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
157    var regexS = "[\\?&]" + name + "=([^&#]*)";
158    var regex = new RegExp(regexS);
159    var results = regex.exec(window.location.search);
160
161    if(results == null) {
162        return "";
163    } else {
164        return decodeURIComponent(results[1].replace(/\+/g, " "));
165    }
166}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.