Skip to content

Instantly share code, notes, and snippets.

@viki53
Last active July 25, 2025 08:11
Show Gist options
  • Save viki53/74ab17ce5eb3c30699aae5620ad031e0 to your computer and use it in GitHub Desktop.
Save viki53/74ab17ce5eb3c30699aae5620ad031e0 to your computer and use it in GitHub Desktop.
Instagram Purified

Instagram Purified

What does this do?

It hides the suggested posts from your Instagram feed, as it should be.

No more getting sucked in by the algorithm!

It also removes some links from the menu, such as "Explore" and "Reels", but also "Meta.ai" and "Threads".

Screenshot of the menu without and with the user styles

How to install

There is two main ways, depending on which browser/extension you use.

Stylus, for Firefox, Chrome, Opera (or any Chrome-based browser)

You need to install and activate an extension that accepts UserStyle files, such as Stylus.

Then open the raw firefox-stylus.user.css file in a new tab. The extension should install the styles automatically, or prompt you to do so. You can also manually create a new style in the extension and paste the contents of that raw file.

Browse Instagram with less distractions ✨

Userscripts, for Safari (iOS and macOS)

You need to have the Userscripts extension installed and activated.

Note: you will need to allow its use on the instagram.com domain.

You can then open the extension page, and add a New CSS file in the sidebar and paste the contents of the raw safari.userscripts.css file into the editor, or add a New Remote and enter the URL of the raw file.

Bonus: By using a shared directory (such as an iCloud-hosted folder) you can use this on macOS and iOS/ipadOS and sync it easily.

Updates

You should ask the extension to update the script whenever a new version is available. Both extensions have an auto-update feature that will fetch and install the new versions when available (based on the updateURL parameter in the comment block at the top of the file).

/* ==UserStyle==
@name instagram-purified
@namespace instagram.com
@description Remove most distractions on Instagram
@version 1.4.0
@author Corentin Hatte (https://www.github.com/viki53)
@homepageURL https://gist.github.com/viki53/74ab17ce5eb3c30699aae5620ad031e0
@updateURL https://gist.github.com/viki53/74ab17ce5eb3c30699aae5620ad031e0/raw/firefox-stylus.user.css
@preprocessor default
==/UserStyle== */
@-moz-document domain("instagram.com") {
/* Hide suggested posts */
main article + div:has(img[src$="/images/instagram/xig/web/illo-confirm-refresh-light.png"]) {
&, & ~ article {
display: none;
}
}
/* Hide loading indicator in timeline */
main div[data-visualcompletion="loading-state"][role="progressbar"] {
display: none;
}
/* Hide suggested profiles in right sidebar */
main > div > div + div > div > div + div {
display: none !important;
}
/* Hide Explore & Reels links in menu */
div[data-visualcompletion="ignore-dynamic"] > div:has(> span > div > :is(a[href="/explore/"], a[href="/reels/"])) {
display: none;
}
/* Hide Meta.ai and Threads links in menu */
div[data-visualcompletion="ignore-dynamic"] + div[data-visualcompletion="ignore-dynamic"] + div > span + span:has(a[href="#"]) {
display: none;
}
}
/* ==UserStyle==
@name instagram-purified
@namespace instagram.com
@description Remove most distractions on Instagram
@match https://*.instagram.com/*
@version 1.4.0
@author Corentin Hatte (https://www.github.com/viki53)
@homepageURL https://gist.github.com/viki53/74ab17ce5eb3c30699aae5620ad031e0
@updateURL https://gist.github.com/viki53/74ab17ce5eb3c30699aae5620ad031e0/raw/safari.userscripts.css
==/UserStyle== */
/* Hide suggested posts */
main article + div:has(img[src$="/images/instagram/xig/web/illo-confirm-refresh-light.png"]) {
&, & ~ article {
display: none;
}
}
/* Hide loading indicator in timeline */
main div[data-visualcompletion="loading-state"][role="progressbar"] {
display: none;
}
/* Hide suggested profiles in right sidebar */
main > div > div + div > div > div + div {
display: none !important;
}
/* Hide Explore & Reels links in menu */
div[data-visualcompletion="ignore-dynamic"] > div:has(> span > div > :is(a[href="/explore/"], a[href="/reels/"])) {
display: none;
}
/* Hide Meta.ai and Threads links in menu */
div[data-visualcompletion="ignore-dynamic"] + div[data-visualcompletion="ignore-dynamic"] + div > span + span:has(a[href="#"]) {
display: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment