let cachedMessage = '';
vk.updates.hear(/^(?:rcon)\s?([^]+)?/i, (message) => {
cachedMessage = message;
return rcon.connect().then(() => {
return rcon.send(`${message.$match[1]}`);
}).then(res => {
console.log(res);
}).then(() => {
return message.send(cachedMessage);
return rcon.disconnect();
})
});
<div id="ranging_1" class="ranging">
... еще много дочерних элементов разного типа ...
</div>
<div id="ranging_2" class="ranging">
... еще много дочерних элементов разного типа ...
</div>
<div id="ranging_3" class="ranging">
... еще много дочерних элементов разного типа ...
</div>
...
<a class="selector" href="#" data-rating-id='ranging_1'>Клац</a>
<a class="selector" href="#" data-rating-id='ranging_2'>Клац</a>
<a class="selector" href="#" data-rating-id='ranging_3'>Клац</a>
var rangings = [].slice.call(document.querySelectorAll('.ranging'));
var selectors = [].slice.call(document.querySelectorAll('.selector'));
selectors.forEach(function(selector) {
selector.addEventListener('click', function(e) {
e.preventDefault();
var ranging = document.getElementById(e.target.dataset.ratingId);
ranging.style.display = '';
rangings.forEach(function(item) {
if (item.id !== e.target.dataset.ratingId) {
item.style.display = 'none';
}
})
});
})
/test
- на ней ты выводишь свой ''<?if ($_GET['show_something']) {?>
<div id="documenter_content" class="method-area-wrapper">
<section id="documenter-1" class="method decripts_search">
<?php include_once"component/descrip_api.php"; ?>
</section>
<section id="documenter-2" class="method">
<?php include_once"component/parameter_reference.php"; ?>
</section>
<section id="documenter-3" class="method">
<?php include_once"component/server_response.php"; ?>
</section>
<section id="documenter-4" class="method">
<div class="method-area">
<div class="method-copy">
<div class="method-copy-padding"></div>
</div>
<div class="method-example">
<?php include_once"component/code_get.php"; ?>
</div>
</div>
</section>
</div>
<?}?>