Skip to content

Instantly share code, notes, and snippets.

View webmanana's full-sized avatar

webmanana webmanana

View GitHub Profile
@webmanana
webmanana / system.json
Created October 29, 2025 02:16
system.json
{
"advanced": {
"gameId": 51778622,
"screenWidth": 816,
"screenHeight": 624,
"uiAreaWidth": 816,
"uiAreaHeight": 624,
"numberFontFilename": "virtue_bold_edit.ttf",
"fallbackFonts": "Verdana, sans-serif",
"fontSize": 22,
@webmanana
webmanana / admin_file_numbering.js
Created January 30, 2025 05:59
Тестовое задание №1
// local/js/admin_file_numbering.js
// Выглядит так https://i.imgur.com/m8Z7BIE.png В публичной части так же.
document.addEventListener("DOMContentLoaded", function () {
function updateFileNumbers() {
let filePreviews = document.querySelectorAll('.adm-fileinput-item-wrapper'); // Контейнеры загруженных файлов
filePreviews.forEach((preview, index) => {
let label = preview.querySelector('.file-number-label');
@webmanana
webmanana / class.php
Created January 30, 2025 05:52
Тестовое задание №2
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die;
// local/components/custom/institut/class.php
use Bitrix\Main\Loader;
class InstitutComponent extends CBitrixComponent
{
public function executeComponent()
{
if (!Loader::includeModule("iblock")) {
@webmanana
webmanana / index.php
Last active November 27, 2024 22:08
pdf.js integration
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.0.943/pdf.min.js"></script>
<script>
var myState = {
pdf: null,
currentPage: 1,
zoom: 1.37
}
pdfjsLib.getDocument("ссылка на pdf").then((pdf) => {
@webmanana
webmanana / form.php
Created July 2, 2021 06:56
Множественный фильтр по привязанным элементам
<?
if( CModule::IncludeModule("iblock") ) {
//получаю фильтр с формы поиска
$nameForm = $_GET["name"];
$addressForm = $_GET["address"];
$otdelForm = $_GET["otdel"];
$doljnostForm = $_GET["doljnost"];
$fioForm = $_GET["fio"];
$phoneForm = $_GET["phone"];
<div style="display:none" id="google_translate_element">
</div>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'ru', includedLanguages: 'en,ru', autoDisplay: false}, 'google_translate_element');
}
</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<style media="screen">
.ct-language__dropdown {
display: inline-block;
@webmanana
webmanana / youtube.js
Last active June 21, 2018 02:05
YouTube player
//example http://webmanana.ru
// 1. This code loads the IFrame Player API code asynchronously.
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
// 2. This function creates an <iframe> (and YouTube player)
// after the API code downloads.
$(function() {
var $nav = $('nav.greedy');
var $btn = $('nav.greedy button');
var $vlinks = $('nav.greedy .links');
var $hlinks = $('nav.greedy .hidden-links');
var numOfItems = 0;
var totalSpace = 0;
var breakWidths = [];
var b = a(".nav").offset().top,
c = function() {
var c = a(window).scrollTop();
c > b ? a(".nav").addClass("sticky") : a(".nav").removeClass("sticky")
};
c(), a(window).scroll(function() {
c()
})
@webmanana
webmanana / anchor-animate.js
Last active June 6, 2018 06:34
anchor scroll animation
jQuery(function($) {
$("a").click(function () {
var elementClick = $(this).attr("href")
var destination = $(elementClick).offset().top - $('.navigation').height();
jQuery("html:not(:animated),body:not(:animated)").animate({scrollTop: destination}, 1000);
return false;
});
});