Skip to content

Instantly share code, notes, and snippets.

@midokhorshed
midokhorshed / hide-blocks.js
Created November 3, 2025 02:24 — forked from levinside/hide-blocks.js
TILDA: Скрываем блоки для всех, показываем тоем кому нужно
// Скрываем блоки которые не нужно показывать всем
// А если есть нужный get-параметр - покажем
t_onReady(function () {
const _hide = b=>(b && (b.style.visibility="hidden",b.style.display="none"));
const _show = b=>(b && (b.style.visibility="visible",b.style.display="block"));
const masterapiParams = new URLSearchParams(window.location.search);
try {
const blocks = [
@midokhorshed
midokhorshed / doJob.js
Last active November 3, 2025 02:19 — forked from levinside/doJob.js
doJob
const searchParams = new URLSearchParams(window.location.search);
const doJob = (job, urlParam) => {
// if (urlParam === undefined || searchParams.has(urlParam)) {
if (urlParam !== undefined && searchParams.has(urlParam)) {
job();
}
};
const fn = function(){
console.log('Выполнить только если в URL есть нужный параметр');
@midokhorshed
midokhorshed / telegramMessageSender.js
Last active November 3, 2025 02:38 — forked from levinside/telegramMessageSender.js
telegramMessageSender
function telegramMessageSender(botToken, chatId) {
const url = `https://api.telegram.org/bot${botToken}/sendMessage`;
return function sendMessage(text, disableNotification = false) {
return fetch(url, {
method: 'post',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
chat_id: chatId,
parse_mode: 'html',
@midokhorshed
midokhorshed / index.html
Created November 3, 2025 01:57 — forked from baslie/index.html
Работа с данными в динамическом каталоге Тильды
<!-- ********************************************************************** -->
<!-- Работа с данными в динамическом каталоге Тильды -->
<!-- ********************************************************************** -->
<script>
const MAX_ATTEMPTS = 10;
let attempts = 0;
function checkForJsStore() {
if (attempts >= MAX_ATTEMPTS) {
console.warn("Достигнуто максимальное количество попыток. Подождите или обновите страницу.");
@midokhorshed
midokhorshed / index.html
Created November 3, 2025 01:49 — forked from baslie/index.html
Меняем год в копирайте в блоке с классом "uc-copyright" (Тильда)
<!-- ********************************************************************** -->
<!-- Меняем год в копирайте в блоке с классом "uc-copyright" (Тильда) -->
<!-- ********************************************************************** -->
<script>
document.addEventListener('DOMContentLoaded', () => {
const startYear = '2014';
const className = 'uc-copyright';
const currentYear = new Date().getFullYear(); // Получаем текущий год
// Находим элемент <strong> внутри заданного класса
/**
** Free to use, but don't abuse :>
**/
(()=>{let a=location.href.match(/\/(?:videos|reel|watch)(?:\/?)(?:\?v=)?(\d+)/);if(a.length<2){console.log("Please open a video before running this script.");return}let c=function(d,e){let f=[],a;for(a in d)if(d.hasOwnProperty(a)){let g=e?e+"["+a+"]":a,b=d[a];f.push(null!==b&&"object"==typeof b?c(b,g):encodeURIComponent(g)+"="+encodeURIComponent(b))}return f.join("&")},b=function(a,b){return fetch("https://www.facebook.com/api/graphql/",{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:c({doc_id:a,variables:JSON.stringify(b),fb_dtsg:require("DTSGInitialData").token,server_timestamps:!0})})};console.log("Getting info..."),b("5279476072161634",{UFI2CommentsProvider_commentsKey:"CometTahoeSidePaneQuery",caller:"CHANNEL_VIEW_FROM_PAGE_TIMELINE",displayCommentsContextEnableComment:null,displayCommentsContextIsAdPreview:null,displayCommentsContextIsAggregatedShare:null,displayCommentsContextIsStorySet:null,displayCommentsFeedbackContext:null
@midokhorshed
midokhorshed / facebook-downloader.js
Created April 9, 2025 16:47 — forked from AsrieltheGoat/facebook-downloader.js
Facebook Downloader Script
// * https://gist.github.com/monokaijs/270e29620c46cabec1caca8c3746729d
// * Rewrite it for another purpose
// * Node v20.5.1
function facebook(link) {
// ! This is the dtsgInitialData value from the browser, it's not a good practice to hardcode it
// ? How to get it:
// const dtsg = require("DTSGInitialData").token; console.log(dtsg);
const dtsgInitialData =
"NAc...";
// ==UserScript==
// @name Facebook video downloader
// @icon https://www.facebook.com/favicon.ico
// @namespace Violentmonkey Scripts
// @match https://www.facebook.com/*
// @match https://web.facebook.com/*
// @grant GM_registerMenuCommand
// @version 1.3
// @author https://github.com/HoangTran0410
// @description Download any video on Facebook (post/chat/comment)
@midokhorshed
midokhorshed / yandex-image-buttons.user.js
Created September 9, 2024 04:50 — forked from Flashwalker/yandex-image-buttons.user.js
Buttons for opening Yandex images on yandex.ru/images/search
// ==UserScript==
// @name yandex-image-buttons
// @namespace http://tampermonkey.net/
// @version 0.3.5
// @description Add buttons (open image & open same) to image viwer on yandex.ru/images/search
// @author Flashwalker
// @match http*://yandex.ru/images/search*
// @updateURL https://gist.github.com/Flashwalker/72c2d871984377075adbe622bb7f9fab/raw/yandex-image-buttons.user.js
// @downloadURL https://gist.github.com/Flashwalker/72c2d871984377075adbe622bb7f9fab/raw/yandex-image-buttons.user.js
// @homepage https://gist.github.com/Flashwalker/72c2d871984377075adbe622bb7f9fab