Recent Posts
poast your fav cool websites
Give me one tech tip you know about
just installed Arch Linux bros
Urge to watch Mr. Robot Hindi dub
/cyb/+/psg/: Cyber-Punk/Security & Privacy
soyjak.st forum which hacked 4chin blocks all indi...
Have you discovered female luke smith yet?
Aarambh hai prachand..
OTG vs Microwave
which llm subscription is the best
Tell me all about indiachan/bharatchan lore
How do people who have a job get time to code on s...
Great time to be a /g/enius
Just found out linux foundation has their own free...
the best android browser has arrived!!
My ThinkPad arrived
(((Open)))ai playing new tricks
NEED ADVICE FROM true /g/entooman
Create something interesting with your skills now ...
Gonna make my own 34-key keyboard
which software on PC and mobile you use to handle ...
🦀🦀🦀🦀🦀
C++ Resources
Local Models General
GPT-5
What is shell programming
Libre Thinkpads
Computing
Tech Scams
Thinkpads are the best Laptops
M. tech. thesis suggestion,ideas.
Linux /gen/
Indian related AI discussion
privacy chuds gtfih
Best LLM model for coding and maths.
PuchAI
User extensions to Bharatchan


L5etee
No.1096
User scripts or themes or anything else you have made for Bharatchan.
t7rh0e
No.1097
>>1096(OP)
motivanon had made one for filters, we have a custom css support now - there's a dedicated thread on /g/ check
duck made pretty cool one, another by i think someone in /gen/
vU1ohB
No.1285
"Script" to download all the media files from a thread. Doesn't support thread watching and other features. Or even checking already downloaded files.
NOTE: Powershell
NOTE: Use if you just want to download all the files from a thread just as they are (except when multiple files with the same name exist, then a count index is prefixed in front of the title)
# edit these
$board = "b"
$thread_id = 146229
# patterns
$post_container_pattern = '<div class="post-container-group">.*'
$image_links_pattern = '<a\s+href="([^"]+)"\s+title="([^"]+)"\s+target="_blank">'
$thread_url = "https://bharatchan.com/board/$board/thread/$thread_id"
$html_content = (Invoke-WebRequest -Uri $thread_url).Content
$desired_block = [regex]::Match($html_content, $post_container_pattern).Value
$mediaFiles = [regex]::Matches($desired_block, $image_links_pattern);
# total of 2 gropus
# 0 -> full match
# 1 -> url path
# 2 -> title
foreach ($file in $mediaFiles) {
$url_path = $file.Groups[1].Value
$title = $file.Groups[2].Value
# check if file with "title" already exists.
# if it does, make a new title
if (Test-Path $title) {
$count = 1
$new_title = "$count-$title"
while (Test-Path $new_title) {
$count++
$new_title = "$count-$title"
}
$title = $new_title
}
# declare the download link variable and download the media file.
$file_url = "https://bharatchan.com" + $url_path
try {
Invoke-WebRequest -Uri $file_url -OutFile $title
Write-Host "Downloaded file: $title";
} catch {
Write-Host "Kuch hogya yaar. Debug karna padega phirse. T_T"
Write-Host "Error: $_.Exception.Message"
}
}
Feedback much appreciated.


ZOS/Bd
No.1311
Bura Mat Dekho Bharatchan Filter (Chrome plugin)
Actually filters out posts. Matches for even names in replies. (Current bhch filters don't do it and we will have to wait for the next bhch update for that I guess)
Two ways to do it.
1. Download it and use it
2. Copy paste the source and stuff yourself.
Download
Link: Expires in 20 days. Normal file upload things such as Mediafire didn't work on my BSNL/Jio connection.
https://limewire.com/d/beImd#RA7ncMvgnP
---------------
Do it yourself.
Step 1: Make a folder, name it anything.
I named mine 'bharatchan-filter'
Download Picrels
Save them as:
icon16.png
icon48.png
icon128.png
hidden.png
Next, make 4 empty files, name them:
content.js
manifest.json
popup.html
popup.js
---
content.js
chrome.storage.sync.get("filterWords", (data) => {
const filterWords = data.filterWords || [];
// Check if filterWords is empty or contains only spaces
const validFilterWords = filterWords
.map(word => word.trim()) // Trim spaces around each word
.filter(word => word.length > 0); // Remove empty strings
if (validFilterWords.length > 0) {
// Function to toggle hiding of a post
const hidePost = (post) => {
// Create a placeholder image element
const placeholderImage = document.createElement("img");
placeholderImage.src = chrome.runtime.getURL("hidden.png");
placeholderImage.alt = "hidden";
placeholderImage.style.cursor = "pointer";
placeholderImage.style.width = "100px";
placeholderImage.style.height = "100px";
// Hide original post content and images
const mediaContainer = post.querySelector(".post-media-container");
if (mediaContainer) {
// Hide media container and insert placeholder image
mediaContainer.style.display = "none";
mediaContainer.parentNode.insertBefore(placeholderImage, mediaContainer);
}
const content = post.querySelector(".post-content");
if (content) content.style.display = "none";
// Set click event to unhide the post
placeholderImage.onclick = () => {
placeholderImage.remove();
if (mediaContainer) mediaContainer.style.display = "block";
if (content) content.style.display = "block";
};
};
// Check all posts and apply filtering
document.querySelectorAll(".post").forEach((post) => {
const text = post.innerText.toLowerCase();
// Only hide posts that contain any of the valid filter words
if (validFilterWords.some(word => text.includes(word.toLowerCase()))) {
hidePost(post);
}
});
}
});
manifest.json
{
"manifest_version": 3,
"name": "Bura Mat Dekho: Bharatchan Filter",
"version": "1.0",
"description": "Filter posts containing specific letter combinations on bharatchan.com",
"permissions": ["storage"],
"host_permissions": ["https://bharatchan.com/*"],
"content_scripts": [
{
"matches": ["https://bharatchan.com/*"],
"js": ["content.js"]
}
],
"action": {
"default_popup": "popup.html",
"default_icon": {
"16": "icon16.png",
"48": "icon48.png",
"128": "icon128.png"
}
},
"web_accessible_resources": [
{
"resources": ["hidden.png"],
"matches": ["<all_urls>"]
}
]
}
popup.html
<!DOCTYPE html>
<html>
<head><title>Bharatchan Filter Settings</title></head>
<body>
<h3>Edit Filter Words</h3>
<textarea id="filterWords" rows="10" cols="30"></textarea>
<button id="saveBtn">Save</button>
<script src="popup.js"></script>
</body>
</html>
popup.js
document.getElementById("saveBtn").addEventListener("click", () => {
const filterWords = document.getElementById("filterWords").value.split(",");
chrome.storage.sync.set({ filterWords }, () => {
alert("Filter words saved!");
});
});
window.onload = () => {
chrome.storage.sync.get("filterWords", (data) => {
document.getElementById("filterWords").value = data.filterWords ? data.filterWords.join(",") : "";
});
};
Save the files, close them.
Now, your folder should look like this:
-/bharatchan-filter/
|
|/content.js
|/hidden.png
|/icon16.png
|/icon48.png
|/icon128.png
|/manifest.json
|/popup.html
|/popup.js
zip them all to get:
bharatchan-filter.zip
Go to chrome plugins, upload and enable the plugin, stick it on the hotbar.
Set your filter words, separated by commas.
Click save.
Done!