From cdbacc271006870ef375e8281ab2a30e55389c18 Mon Sep 17 00:00:00 2001 From: Pedro Date: Mon, 4 May 2026 18:45:43 +0330 Subject: [PATCH 01/18] back button for chats --- src/back_button.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/back_button.svg diff --git a/src/back_button.svg b/src/back_button.svg new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/back_button.svg @@ -0,0 +1 @@ + From 5aa80f115613682e7515bb0028cb1c253cbe0eea Mon Sep 17 00:00:00 2001 From: Pedro Date: Mon, 4 May 2026 18:47:21 +0330 Subject: [PATCH 02/18] Delete src/back_button.svg --- src/back_button.svg | 1 - 1 file changed, 1 deletion(-) delete mode 100644 src/back_button.svg diff --git a/src/back_button.svg b/src/back_button.svg deleted file mode 100644 index 8b13789..0000000 --- a/src/back_button.svg +++ /dev/null @@ -1 +0,0 @@ - From 60d41ea6ec5453f498a59a71ecc8865724e29c07 Mon Sep 17 00:00:00 2001 From: Pedro Date: Mon, 4 May 2026 18:48:22 +0330 Subject: [PATCH 03/18] back button for chats --- src/back_button.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/back_button.svg diff --git a/src/back_button.svg b/src/back_button.svg new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/back_button.svg @@ -0,0 +1 @@ + From 2af3660175c8eaf6daa00cb4970eb70ecdcf6587 Mon Sep 17 00:00:00 2001 From: Pedro Date: Mon, 4 May 2026 18:50:01 +0330 Subject: [PATCH 04/18] add back button for chats --- src/back_button.svg | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/back_button.svg b/src/back_button.svg index 8b13789..38fae6d 100644 --- a/src/back_button.svg +++ b/src/back_button.svg @@ -1 +1,4 @@ - + + + + From f9b7f88c6db9d6b308c434083a4493cae9008b30 Mon Sep 17 00:00:00 2001 From: Pedro Date: Mon, 4 May 2026 18:53:46 +0330 Subject: [PATCH 05/18] Update style.css --- src/style.css | 68 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 46 insertions(+), 22 deletions(-) diff --git a/src/style.css b/src/style.css index 0592845..684d74f 100644 --- a/src/style.css +++ b/src/style.css @@ -15,7 +15,7 @@ body { } .menu_block { width: 450px; - background: black; + background: #0E0E0E; box-shadow: 0 0 20px 0px #0000001a; z-index: 1; display: flex; @@ -68,15 +68,28 @@ a { user-select: none; cursor: pointer; transition: 0.5s; + position: relative; +} +.menu_channel_wrapper::after { + content: ''; + position: absolute; + bottom: 0; + left: 80px; + right: 15px; + height: 0.5px; + background: #2f2f2f; +} +.menu_channel_wrapper:last-child::after { + display: none; } .menu_channel_wrapper:hover { background: #000000; } .menu_channel_selected { - background: #258 !important; + background: #191919 !important; } .menu_channel_selected p,.menu_channel_selected span { - color: black !important; + color: #d9d9d9 !important; } .menu_channel_avatar { width: 60px; @@ -130,7 +143,8 @@ a { white-space: nowrap; } .menu_channel_selected .menu_channel_stats span { - background: #3F51B5 !important; + background: #4A4A4A !important; + color: #e0e0e0 !important; } .menu_channel_info p{ width: calc(100% - 25px); @@ -187,34 +201,44 @@ a { cursor: pointer; transition: 0.5s; } -.menu_channel_stats {width: 50px;position: relative;flex-shrink: 0;} -.menu_channel_stats p {position: absolute;margin: 0;right: 0;font-size: 14px;top: 5px;color: #a0a0a0;width: 100px;text-align: right;} +.menu_channel_stats { + width: 50px; + position: relative; + flex-shrink: 0; +} +.menu_channel_stats p { + position: absolute; + margin: 0; + right: 0; + font-size: 14px; + top: 5px; + color: #a0a0a0; + width: 100px; + text-align: right; +} .menu_channel_stats span { position: absolute; right: 0; top: 30px; - background: #000000; + background: #4A4A4A; padding: 2px 8px; border-radius: 20px; - color: #5a5a5a; + color: #e0e0e0; font-size: 15px; font-family: monospace; } .tgme_header::after { - content: 'X'; + content: ''; width: 30px; height: 30px; - background: #00000014; position: absolute; right: 15px; top: 16px; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M4,11L16.2,11L10.6,5.4L12,4L20,12L12,20L10.6,18.6L16.2,13L4,13L4,11z' fill='%23FFFFFF'/%3E%3C/svg%3E"); + background-size: 24px 24px; + background-repeat: no-repeat; + background-position: center; border-radius: 7px; - display: flex; - justify-content: center; - align-items: center; - font-family: monospace; - font-size: 18px; - color: #000; user-select: none; cursor: pointer; } @@ -1541,7 +1565,7 @@ a.tgme_widget_message_contact_wrap:focus:hover { margin-top: 6px; } .tgme_widget_message_text { - font-size: 18px; + font-size: 16px; line-height: 21px; word-break: break-word; margin-top: 6px; @@ -1616,7 +1640,7 @@ a.tgme_widget_message_contact_wrap:focus:hover { .tgme_widget_message_reply .tgme_widget_message_author, .tgme_widget_message_reply .tgme_widget_message_text, .tgme_widget_message_reply .tgme_widget_message_metatext { - font-size: 18px; + font-size: 16px; line-height: 20px; margin: -2px 0; white-space: nowrap; @@ -2595,7 +2619,7 @@ html body { --text-color: #fff; --second-color: #fff; --box-bg: #6666; - --box-bg-blured: rgba(37, 155, 237, 0.85); + --box-bg-blured: rgba(16, 16, 16, 0.85); --service-bg-blured: rgba(37, 155, 237, 0.85); --highlight-bg: rgba(37, 155, 237, 0.85); --tme-logo-color: #363b40; @@ -2678,7 +2702,7 @@ html.theme_dark body.twallpaper .tgme_background_pattern { top: 0; z-index: 100; background: var(--box-bg-blured); - box-shadow: 0px 2px 4px rgba(37, 155, 237, 0.85); + box-shadow: 0px 2px 4px rgba(16, 16, 16, 0.85); -webkit-backdrop-filter: blur(25px); backdrop-filter: blur(25px); height: 63px; @@ -3065,7 +3089,7 @@ a.tgme_channel_join_telegram { } .tgme_widget_message_author, .tgme_widget_message_forwarded_from { - font-size: 18px; + font-size: 16px; line-height: 19px; margin: 1px 0 0; } @@ -3082,7 +3106,7 @@ a.tgme_channel_join_telegram { .tgme_widget_message_text, .tgme_widget_message_poll, .tgme_widget_message_inline_button { - font-size: 18px; + font-size: 16px; line-height: 21px; } .tgme_widget_message_poll_type { From 0a55b5ef8cd824c3a1ebb3f8cfaaa7da2959ab33 Mon Sep 17 00:00:00 2001 From: Pedro Date: Mon, 4 May 2026 18:56:09 +0330 Subject: [PATCH 06/18] change version from 3 to 4 --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 6e2c856..fb13a32 100644 --- a/index.php +++ b/index.php @@ -4,7 +4,7 @@ if (!file_exists(__DIR__.'/cache')) mkdir(__DIR__.'/cache'); if (!file_exists(__DIR__.'/channels.txt')) file_put_contents(__DIR__.'/channels.txt',''); $CHANNELS = file_parse(); - $VERSION = '3'; + $VERSION = '4'; ?> From 73628d3daf6196b6e2a4c7e39ed48b471ef415fd Mon Sep 17 00:00:00 2001 From: Pedro Date: Mon, 4 May 2026 19:10:23 +0330 Subject: [PATCH 07/18] change version from 3 to 4, rename cache folder to .cache --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index fb13a32..43b7ffe 100644 --- a/index.php +++ b/index.php @@ -1,10 +1,10 @@ From 2d9f54e15d034ed7c334e3cb84308cbc2a3de21c Mon Sep 17 00:00:00 2001 From: Pedro Date: Mon, 4 May 2026 19:11:31 +0330 Subject: [PATCH 08/18] rename cache folder to .cache --- libs.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libs.php b/libs.php index b7da1b6..3476ddf 100644 --- a/libs.php +++ b/libs.php @@ -45,7 +45,7 @@ function html_parse($chid,$next){ function json_info($chid){ $html = curl_auto($chid); $isok = stripos($html,' Date: Mon, 4 May 2026 19:12:45 +0330 Subject: [PATCH 09/18] rename cache folder to .cache --- proxy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxy.php b/proxy.php index 5cf8184..77dddd4 100644 --- a/proxy.php +++ b/proxy.php @@ -16,5 +16,5 @@ http_response_code(400); }else{ header('Content-Type: image/jpeg'); - header('Location: cache/'.$hash.'.jpg'); - } \ No newline at end of file + header('Location: .cache/'.$hash.'.jpg'); + } From 526f58e14dbee51478e1155776a99dc609af63b0 Mon Sep 17 00:00:00 2001 From: Pedro Date: Mon, 4 May 2026 19:20:38 +0330 Subject: [PATCH 10/18] not used in code --- src/back_button.svg | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 src/back_button.svg diff --git a/src/back_button.svg b/src/back_button.svg deleted file mode 100644 index 38fae6d..0000000 --- a/src/back_button.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - From 82091920fbc89c79ecd96db084b30bf185a7b7a0 Mon Sep 17 00:00:00 2001 From: Parsast Date: Tue, 5 May 2026 12:10:30 +0330 Subject: [PATCH 11/18] remove unneeded code in style.css --- src/style.css | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/style.css b/src/style.css index 684d74f..2caea04 100644 --- a/src/style.css +++ b/src/style.css @@ -68,19 +68,6 @@ a { user-select: none; cursor: pointer; transition: 0.5s; - position: relative; -} -.menu_channel_wrapper::after { - content: ''; - position: absolute; - bottom: 0; - left: 80px; - right: 15px; - height: 0.5px; - background: #2f2f2f; -} -.menu_channel_wrapper:last-child::after { - display: none; } .menu_channel_wrapper:hover { background: #000000; From 104b779a5cf7c8fc4a27dd5f9e3f0eb83f4eea97 Mon Sep 17 00:00:00 2001 From: Parsast Date: Thu, 7 May 2026 12:50:42 +0330 Subject: [PATCH 12/18] add backstory --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 97ea747..a4703da 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## ezytel -## Usage: +## Usage 1. Clone the repo @@ -27,3 +27,6 @@ php -S localhost:8000 ``` Now you could open ezytel at your browser `http://localhost:8000` + +## Backstory +This project was developed at a rozblog forum by J[o]King when Google was whitelisted at the 21 iran network outage, I decided to push this project at the 2026 network outage when they opened google.com. [Original Version](https://github.com/Parsa307/ezytel/tree/rozblog-version) I am not affiliated with J[o]King. From b8555525116bf259523cd274cfda9fdef9175bbb Mon Sep 17 00:00:00 2001 From: Parsast Date: Thu, 7 May 2026 21:24:38 +0330 Subject: [PATCH 13/18] rollback font size change --- src/style.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/style.css b/src/style.css index 2caea04..ac066e5 100644 --- a/src/style.css +++ b/src/style.css @@ -1627,7 +1627,7 @@ a.tgme_widget_message_contact_wrap:focus:hover { .tgme_widget_message_reply .tgme_widget_message_author, .tgme_widget_message_reply .tgme_widget_message_text, .tgme_widget_message_reply .tgme_widget_message_metatext { - font-size: 16px; + font-size: 14px; line-height: 20px; margin: -2px 0; white-space: nowrap; @@ -3076,7 +3076,7 @@ a.tgme_channel_join_telegram { } .tgme_widget_message_author, .tgme_widget_message_forwarded_from { - font-size: 16px; + font-size: 14px; line-height: 19px; margin: 1px 0 0; } @@ -3093,15 +3093,15 @@ a.tgme_channel_join_telegram { .tgme_widget_message_text, .tgme_widget_message_poll, .tgme_widget_message_inline_button { - font-size: 16px; + font-size: 14px; line-height: 21px; } .tgme_widget_message_poll_type { - font-size: 18px; + font-size: 13px; margin-top: 0; } .tgme_widget_message_poll_options { - font-size: 18px; + font-size: 14px; min-width: 240px; padding-top: 0; margin-bottom: 10px; From b651cffd65db6f60d1ae7717afdc5028e44cf313 Mon Sep 17 00:00:00 2001 From: Parsast Date: Thu, 7 May 2026 21:36:21 +0330 Subject: [PATCH 14/18] remove unneeded code in style.css --- src/style.css | 1 - 1 file changed, 1 deletion(-) diff --git a/src/style.css b/src/style.css index ac066e5..02c85f3 100644 --- a/src/style.css +++ b/src/style.css @@ -131,7 +131,6 @@ a { } .menu_channel_selected .menu_channel_stats span { background: #4A4A4A !important; - color: #e0e0e0 !important; } .menu_channel_info p{ width: calc(100% - 25px); From e91b7bf617cc7a34c089fa9cc741595d036163ae Mon Sep 17 00:00:00 2001 From: Pedro Date: Wed, 20 May 2026 00:29:54 +0330 Subject: [PATCH 15/18] change version from 4 to 5 --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 43b7ffe..5f1fda3 100644 --- a/index.php +++ b/index.php @@ -4,7 +4,7 @@ if (!file_exists(__DIR__.'/.cache')) mkdir(__DIR__.'/.cache'); if (!file_exists(__DIR__.'/channels.txt')) file_put_contents(__DIR__.'/channels.txt',''); $CHANNELS = file_parse(); - $VERSION = '4'; + $VERSION = '5'; ?> From 96beb38e12bda6e703f7d14a83bb26dd7426968b Mon Sep 17 00:00:00 2001 From: Pedro Date: Wed, 20 May 2026 00:33:55 +0330 Subject: [PATCH 16/18] reback channel list divider --- src/style.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/style.css b/src/style.css index 02c85f3..1b15bb5 100644 --- a/src/style.css +++ b/src/style.css @@ -68,6 +68,19 @@ a { user-select: none; cursor: pointer; transition: 0.5s; + position: relative; +} +.menu_channel_wrapper::after { + content: ''; + position: absolute; + bottom: 0; + left: 80px; + right: 15px; + height: 0.5px; + background: #2f2f2f; +} +.menu_channel_wrapper:last-child::after { + display: none; } .menu_channel_wrapper:hover { background: #000000; From 8d4dd61a1dfdec4409e13ff65d131d5f0a5e6089 Mon Sep 17 00:00:00 2001 From: Pedro Date: Wed, 20 May 2026 01:00:56 +0330 Subject: [PATCH 17/18] Replace redirect with direct file read for cached images --- proxy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy.php b/proxy.php index 77dddd4..a149d0d 100644 --- a/proxy.php +++ b/proxy.php @@ -16,5 +16,5 @@ http_response_code(400); }else{ header('Content-Type: image/jpeg'); - header('Location: .cache/'.$hash.'.jpg'); + readfile(__DIR__.'/.cache/'.$hash.'.jpg'); } From a552a5788017e50bf0ddb6aecedc6fceae078bcc Mon Sep 17 00:00:00 2001 From: Pedro Date: Wed, 20 May 2026 01:39:22 +0330 Subject: [PATCH 18/18] Add Android back button support to return from channel to list --- src/script.js | 92 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 58 insertions(+), 34 deletions(-) diff --git a/src/script.js b/src/script.js index e7ddaa8..2074318 100644 --- a/src/script.js +++ b/src/script.js @@ -1,53 +1,70 @@ -document.addEventListener("DOMContentLoaded",()=>{ +document.addEventListener("DOMContentLoaded", () => { + // ========== مدیریت دکمه بازگشت گوشی ========== + window.addEventListener("popstate", function (e) { + if (e.state && e.state.channelOpen) { + // برگردوندن نمای لیست کانال‌ها + document.querySelector(".menu_block").classList.remove("menu_block_hide"); + document.querySelector(".main_block").innerHTML = ""; + document.querySelectorAll(".menu_channel_selected").forEach(elm => { + elm.classList.remove("menu_channel_selected"); + }); + // حذف state تا دفعه بعدی دکمه بازگشت از سایت خارج شود + history.replaceState(null, "", window.location.pathname); + } + }); + // register channels actions document.querySelectorAll(".menu_channel_wrapper").forEach(element => { var chid = element.querySelector(".menu_channel_info p").innerText; - element.setAttribute("chid",chid); - element.addEventListener("click",()=>{ + element.setAttribute("chid", chid); + element.addEventListener("click", () => { document.querySelectorAll(".menu_channel_selected").forEach(elm => { elm.classList.remove("menu_channel_selected"); }); element.classList.add("menu_channel_selected"); document.querySelector(".main_block").innerHTML = ""; - load_more(0,chid,null); + load_more(0, chid, null); + // ثبت state در تاریخچه مرورگر + history.pushState({ channelOpen: true, chid: chid }, "", "#" + chid); }); }); + // load channels updates let chnum = 0; document.querySelectorAll(".menu_channel_wrapper").forEach(element => { setTimeout(() => { var XHR = new XMLHttpRequest(); - XHR.open("GET","proxy.php?info="+element.getAttribute("chid"),true); + XHR.open("GET", "proxy.php?info=" + element.getAttribute("chid"), true); XHR.send(); - XHR.onreadystatechange = function() { + XHR.onreadystatechange = function () { if (this.readyState == 4) { - if (this.status == 200){ + if (this.status == 200) { let data = JSON.parse(XHR.responseText); - if ('avatar' in data && data['avatar'] != ''){ + if ('avatar' in data && data['avatar'] != '') { element.querySelector("img").src = data['avatar']; element.querySelector("img").style.opacity = 1; } - if ('name' in data){ + if ('name' in data) { element.querySelector(".menu_channel_info p").innerHTML = data['name']; } - if ('desc' in data){ + if ('desc' in data) { element.querySelector(".menu_channel_info span").innerHTML = data['desc']; } - if ('newmsg' in data && 'datestr' in data){ - element.querySelector(".menu_channel_stats").innerHTML = '

'+data['datestr']+'

'+data['newmsg']+''; - if (data['newmsg'] == ''){ + if ('newmsg' in data && 'datestr' in data) { + element.querySelector(".menu_channel_stats").innerHTML = '

' + data['datestr'] + '

' + data['newmsg'] + ''; + if (data['newmsg'] == '') { element.classList.add("menu_channel_allread"); } } - if ('date' in data){ - element.setAttribute("dateid",data['date']); + if ('date' in data) { + element.setAttribute("dateid", data['date']); let move = null; document.querySelectorAll(".menu_channel_wrapper").forEach(elem => { if (move == null && parseInt(data['date']) >= parseInt(elem.getAttribute("dateid"))) move = elem; }); - if (move != null) document.querySelector(".menu_block").moveBefore(element,move); + if (move != null) document.querySelector(".menu_block").moveBefore(element, move); } - }else{ + } else { element.querySelector(".menu_channel_info span").innerHTML = "NETWORK ERROR"; } } @@ -55,51 +72,58 @@ document.addEventListener("DOMContentLoaded",()=>{ }, chnum * 1000); chnum++; }); + // register search function - document.querySelector(".tgme_header_search input").addEventListener("keyup",()=>{ + document.querySelector(".tgme_header_search input").addEventListener("keyup", () => { let search = document.querySelector(".tgme_header_search input").value.trim().toLowerCase(); document.querySelectorAll(".menu_channel_wrapper").forEach(element => { - if (search == '' || element.getAttribute("chid").includes(search) || element.querySelector(".menu_channel_info p").innerText.includes(search)){ + if (search == '' || element.getAttribute("chid").includes(search) || element.querySelector(".menu_channel_info p").innerText.includes(search)) { element.style.display = "flex"; - }else{ + } else { element.style.display = "none"; } }); }); }); -function load_more(next,chid,obj) { + +function load_more(next, chid, obj) { var XHR = new XMLHttpRequest(); - XHR.open("GET","proxy.php?next="+next+"&chid="+chid,true); + XHR.open("GET", "proxy.php?next=" + next + "&chid=" + chid, true); document.querySelector(".page_progress_bar").style.display = "block"; XHR.send(); - XHR.onreadystatechange = function() { + XHR.onreadystatechange = function () { if (this.readyState == 4) { document.querySelector(".page_progress_bar").style.display = "none"; - if (this.status == 200){ + if (this.status == 200) { if (obj != null) obj.parentNode.remove(); let height = document.querySelector(".main_block").scrollHeight; document.querySelector(".main_block").innerHTML = XHR.responseText + document.querySelector(".main_block").innerHTML; - if (next == 0){ - document.querySelector(".main_block").scrollTo({top: document.querySelector(".main_block").scrollHeight}); - if (document.querySelector('div[chid="'+chid+'"]')!=null){ - document.querySelector('div[chid="'+chid+'"]').classList.add("menu_channel_allread"); + if (next == 0) { + // ثبت state هنگام باز شدن اولیه کانال + history.pushState({ channelOpen: true, chid: chid }, "", "#" + chid); + + document.querySelector(".main_block").scrollTo({ top: document.querySelector(".main_block").scrollHeight }); + if (document.querySelector('div[chid="' + chid + '"]') != null) { + document.querySelector('div[chid="' + chid + '"]').classList.add("menu_channel_allread"); } document.querySelector(".menu_block").classList.add("menu_block_hide"); - if (document.querySelector(".tgme_header")!=null){ - document.querySelector(".tgme_header").addEventListener("click",()=>{ + if (document.querySelector(".tgme_header") != null) { + document.querySelector(".tgme_header").addEventListener("click", () => { document.querySelector(".menu_block").classList.remove("menu_block_hide"); document.querySelectorAll(".menu_channel_selected").forEach(elm => { elm.classList.remove("menu_channel_selected"); }); document.querySelector(".main_block").innerHTML = ""; + // پاک کردن state هنگام بستن کانال با کلیک روی هدر + history.replaceState(null, "", window.location.pathname); }); } - }else{ - document.querySelector(".main_block").scrollTo({top: height}); + } else { + document.querySelector(".main_block").scrollTo({ top: height }); } - }else{ + } else { alert("something went wrong! try again!"); } } } -} \ No newline at end of file +}