mirror of
https://gitlab.com/thelazyoxymoron/siddhartha-golu-website.git
synced 2025-07-27 04:47:59 +02:00
458 lines
26 KiB
HTML
458 lines
26 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en" dir="auto">
|
||
|
||
<head><meta charset="utf-8">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||
<meta name="robots" content="index, follow">
|
||
<title>Annihilation of Caste(Annotated Edition) by Arundhati Roy | Siddhartha Golu</title>
|
||
<meta name="keywords" content="non-fiction, indian-authors, religion, favourites">
|
||
<meta name="description" content="Check it out on Goodreads
|
||
I find India really fascinating sometimes, even though I’ve lived my whole life here. What the cultural multitudes and colorful festivals hide underneath is an ugly facade which threatens to break everything that has been built over the years. What I find most fascinating is how we’ve conditioned ourselves to ignore the blatant reality and move ahead with an oblivious calm, living in shit and aspiring for the gold.">
|
||
<meta name="author" content="Siddhartha Golu">
|
||
<link rel="canonical" href="https://www.siddharthagolu.com/posts/reading/annihilation-of-caste/">
|
||
<link crossorigin="anonymous" href="/assets/css/stylesheet.66857e85d743ed43ea67ff6c21de89acf86c4e0d759944d3eed3e3cc709b1266.css" integrity="sha256-ZoV+hddD7UPqZ/9sId6JrPhsTg11mUTT7tPjzHCbEmY=" rel="preload stylesheet" as="style">
|
||
<link rel="icon" href="https://www.siddharthagolu.com/favicon.ico">
|
||
<link rel="icon" type="image/png" sizes="16x16" href="https://www.siddharthagolu.com/favicon-16x16.png">
|
||
<link rel="icon" type="image/png" sizes="32x32" href="https://www.siddharthagolu.com/favicon-32x32.png">
|
||
<link rel="apple-touch-icon" href="https://www.siddharthagolu.com/apple-touch-icon.png">
|
||
<link rel="mask-icon" href="https://www.siddharthagolu.com/safari-pinned-tab.svg">
|
||
<meta name="theme-color" content="#2e2e33">
|
||
<meta name="msapplication-TileColor" content="#2e2e33">
|
||
<noscript>
|
||
<style>
|
||
#theme-toggle,
|
||
.top-link {
|
||
display: none;
|
||
}
|
||
|
||
</style>
|
||
<style>
|
||
@media (prefers-color-scheme: dark) {
|
||
:root {
|
||
--theme: rgb(29, 30, 32);
|
||
--entry: rgb(46, 46, 51);
|
||
--primary: rgb(218, 218, 219);
|
||
--secondary: rgb(155, 156, 157);
|
||
--tertiary: rgb(65, 66, 68);
|
||
--content: rgb(196, 196, 197);
|
||
--code-block-bg: rgb(46, 46, 51);
|
||
--code-bg: rgb(55, 56, 62);
|
||
--border: rgb(51, 51, 51);
|
||
}
|
||
|
||
.list {
|
||
background: var(--theme);
|
||
}
|
||
|
||
.list:not(.dark)::-webkit-scrollbar-track {
|
||
background: 0 0;
|
||
}
|
||
|
||
.list:not(.dark)::-webkit-scrollbar-thumb {
|
||
border-color: var(--theme);
|
||
}
|
||
}
|
||
|
||
</style>
|
||
</noscript><meta property="og:title" content="Annihilation of Caste(Annotated Edition) by Arundhati Roy" />
|
||
<meta property="og:description" content="Check it out on Goodreads
|
||
I find India really fascinating sometimes, even though I’ve lived my whole life here. What the cultural multitudes and colorful festivals hide underneath is an ugly facade which threatens to break everything that has been built over the years. What I find most fascinating is how we’ve conditioned ourselves to ignore the blatant reality and move ahead with an oblivious calm, living in shit and aspiring for the gold." />
|
||
<meta property="og:type" content="article" />
|
||
<meta property="og:url" content="https://www.siddharthagolu.com/posts/reading/annihilation-of-caste/" />
|
||
<meta property="og:image" content="https://www.siddharthagolu.com/posts/reading/annihilation-of-caste/images/caste.jpg" /><meta property="article:section" content="posts" />
|
||
<meta property="article:published_time" content="2021-07-23T22:56:47+05:30" />
|
||
<meta property="article:modified_time" content="2023-06-23T00:36:16+05:30" /><meta property="og:site_name" content="Siddhartha Golu" />
|
||
|
||
<meta name="twitter:card" content="summary_large_image" />
|
||
<meta name="twitter:image" content="https://www.siddharthagolu.com/posts/reading/annihilation-of-caste/images/caste.jpg" />
|
||
<meta name="twitter:title" content="Annihilation of Caste(Annotated Edition) by Arundhati Roy"/>
|
||
<meta name="twitter:description" content="Check it out on Goodreads
|
||
I find India really fascinating sometimes, even though I’ve lived my whole life here. What the cultural multitudes and colorful festivals hide underneath is an ugly facade which threatens to break everything that has been built over the years. What I find most fascinating is how we’ve conditioned ourselves to ignore the blatant reality and move ahead with an oblivious calm, living in shit and aspiring for the gold."/>
|
||
|
||
|
||
<script type="application/ld+json">
|
||
{
|
||
"@context": "https://schema.org",
|
||
"@type": "BreadcrumbList",
|
||
"itemListElement": [
|
||
{
|
||
"@type": "ListItem",
|
||
"position": 1 ,
|
||
"name": "Posts",
|
||
"item": "https://www.siddharthagolu.com/posts/"
|
||
},
|
||
{
|
||
"@type": "ListItem",
|
||
"position": 2 ,
|
||
"name": "Annihilation of Caste(Annotated Edition) by Arundhati Roy",
|
||
"item": "https://www.siddharthagolu.com/posts/reading/annihilation-of-caste/"
|
||
}
|
||
]
|
||
}
|
||
</script>
|
||
<script type="application/ld+json">
|
||
{
|
||
"@context": "https://schema.org",
|
||
"@type": "BlogPosting",
|
||
"headline": "Annihilation of Caste(Annotated Edition) by Arundhati Roy",
|
||
"name": "Annihilation of Caste(Annotated Edition) by Arundhati Roy",
|
||
"description": "Check it out on Goodreads\nI find India really fascinating sometimes, even though I\u0026rsquo;ve lived my whole life here. What the cultural multitudes and colorful festivals hide underneath is an ugly facade which threatens to break everything that has been built over the years. What I find most fascinating is how we\u0026rsquo;ve conditioned ourselves to ignore the blatant reality and move ahead with an oblivious calm, living in shit and aspiring for the gold.",
|
||
"keywords": [
|
||
"non-fiction", "indian-authors", "religion", "favourites"
|
||
],
|
||
"articleBody": "Check it out on Goodreads\nI find India really fascinating sometimes, even though I’ve lived my whole life here. What the cultural multitudes and colorful festivals hide underneath is an ugly facade which threatens to break everything that has been built over the years. What I find most fascinating is how we’ve conditioned ourselves to ignore the blatant reality and move ahead with an oblivious calm, living in shit and aspiring for the gold.\nCaste and religion are two of the most contentious topics out there, so much ingrained in our day to day life that one cannot even comprehend that any alternatives exist. Ambedkar had tried to show an alternative way out, and it only speaks of the deep-rootedness of the system when all we remember Dr. Ambedkar for is writing the Constitution (albiet not a small feat by any stretch), while all his life he had worked to shake the society off from the chains of caste.\nThis annotated edition is the perfect way to educate oneself about the almost forgotten history of a radical man who dared to question the status quo and to demand justice, fighting not against a foreign invader but with his fellow countrymen, and who has been sidelined from every history book that is taught in the country.\nCaste is part and parcel of a Hindu life. I did not realize or experience this until I entered college. Although it remains rather concealed amongst students, it reared its ugly head whenever the matter of reservation (Affirmative action in west) was discussed. Arundhati Roy put this brilliantly in her forward:\n‘Merit’ is the weapon of choice for an Indian elite that has dominated a system by allegedly divine authorisation, and denied knowledge—of certain kinds—to the subordinated castes for thousands of years. Now that it is being challenged, there have been passionate privileged-caste protests against the policy of reservation in government jobs and student quotas in universities. The presumption is that ‘merit’ exists in an ahistorical social vacuum and that the advantages that come from privileged-caste social networking and the establishment’s entrenched hostility towards the subordinated castes are not factors that deserve consideration. In truth, ‘merit’ has become a euphemism for nepotism.\nEven now when I no longer believe in religion (Hinduism was never my religion, it was my parents’ religion which I inherited, much like everyone else), I still get asked for my “last name” as a proxy for my caste. It is so seeped into our consciousness that we can’t help but feel a reverence whenever we come across someone from a “higher caste”, or to feel discomfort when we meet someone from a “lower caste”. This prejudice even trumps religious beliefs in India - even though their scriptures don’t sanction it, the elite Muslims, Sikhs and Christians all practice caste discrimination.\nThe arguments put forward by Ambedkar for breaking up the entire caste system is a brilliant demonstration of the crystal-clear thinking of a man who left such a huge legacy on the Indian subcontinent and made sure that the future of India is steered in the right direction. He is criticised for asking for a radical transformation of society when India needed to unite everyone to win its freedom. What these criticisms seem to miss is that every radical man/woman is considered radical precisely because i) they go against the cultural norms and ii) they question the deep-rooted prejudiced beliefs. There will never come an “appropriate” time for reforms, as is sadly evident with the still prevalent caste discrimination almost 90 years after Ambedkar decided to storm the gates.\nIt’s a travesty that he still remains, for the large part, forgotten.\n",
|
||
"wordCount" : "610",
|
||
"inLanguage": "en",
|
||
"image":"https://www.siddharthagolu.com/posts/reading/annihilation-of-caste/images/caste.jpg","datePublished": "2021-07-23T22:56:47+05:30",
|
||
"dateModified": "2023-06-23T00:36:16+05:30",
|
||
"author":[{
|
||
"@type": "Person",
|
||
"name": "Siddhartha Golu"
|
||
}],
|
||
"mainEntityOfPage": {
|
||
"@type": "WebPage",
|
||
"@id": "https://www.siddharthagolu.com/posts/reading/annihilation-of-caste/"
|
||
},
|
||
"publisher": {
|
||
"@type": "Organization",
|
||
"name": "Siddhartha Golu",
|
||
"logo": {
|
||
"@type": "ImageObject",
|
||
"url": "https://www.siddharthagolu.com/favicon.ico"
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
</head>
|
||
|
||
<body class="" id="top">
|
||
<script>
|
||
if (localStorage.getItem("pref-theme") === "dark") {
|
||
document.body.classList.add('dark');
|
||
} else if (localStorage.getItem("pref-theme") === "light") {
|
||
document.body.classList.remove('dark')
|
||
} else if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||
document.body.classList.add('dark');
|
||
}
|
||
|
||
</script>
|
||
|
||
<header class="header">
|
||
<nav class="nav">
|
||
<div class="logo">
|
||
<a href="https://www.siddharthagolu.com/" accesskey="h" title="Siddhartha Golu (Alt + H)">
|
||
<img src="https://www.siddharthagolu.com/apple-touch-icon.png" alt="" aria-label="logo"
|
||
height="30">Siddhartha Golu</a>
|
||
<div class="logo-switches">
|
||
<button id="theme-toggle" accesskey="t" title="(Alt + T)">
|
||
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
|
||
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
||
stroke-linejoin="round">
|
||
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
|
||
</svg>
|
||
<svg id="sun" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
|
||
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
||
stroke-linejoin="round">
|
||
<circle cx="12" cy="12" r="5"></circle>
|
||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||
</svg>
|
||
</button>
|
||
</div>
|
||
</div>
|
||
<ul id="menu">
|
||
<li>
|
||
<a href="https://www.siddharthagolu.com/about" title="About">
|
||
<span>About</span>
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="https://www.siddharthagolu.com/archive" title="Archive">
|
||
<span>Archive</span>
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="https://www.siddharthagolu.com/categories" title="Categories">
|
||
<span>Categories</span>
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="https://www.siddharthagolu.com/tags/" title="Tags">
|
||
<span>Tags</span>
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="https://www.siddharthagolu.com/search/" title="Search (Alt + /)" accesskey=/>
|
||
<span>Search</span>
|
||
</a>
|
||
</li>
|
||
</ul>
|
||
</nav>
|
||
</header>
|
||
<main class="main">
|
||
|
||
<article class="post-single">
|
||
<header class="post-header">
|
||
<div class="breadcrumbs"><a href="https://www.siddharthagolu.com/">Home</a> » <a href="https://www.siddharthagolu.com/posts/">Posts</a></div>
|
||
<h1 class="post-title entry-hint-parent">
|
||
Annihilation of Caste(Annotated Edition) by Arundhati Roy
|
||
</h1>
|
||
<div class="post-meta"><span title='2021-07-23 22:56:47 +0530 IST'>🗓 July 23, 2021</span> · 3 min · 🔖 <a href="/tags/non-fiction"> non-fiction</a> · <a href="/tags/indian-authors"> indian-authors</a> · <a href="/tags/religion"> religion</a> · <a href="/tags/favourites"> favourites</a>
|
||
|
||
</div>
|
||
</header>
|
||
<div class="post-content"><p><a href="https://www.goodreads.com/review/show/4063570586">Check it out on Goodreads</a></p>
|
||
<hr>
|
||
<p><img loading="lazy" src="/images/caste.jpg#center" alt="Annihilation Cover" title="Annihilation Cover" />
|
||
</p>
|
||
<p>I find India really fascinating sometimes, even though I’ve lived my whole life here. What the cultural multitudes and colorful festivals hide underneath is an ugly facade which threatens to break everything that has been built over the years. What I find most fascinating is how we’ve conditioned ourselves to ignore the blatant reality and move ahead with an oblivious calm, living in shit and aspiring for the gold.</p>
|
||
<p>Caste and religion are two of the most contentious topics out there, so much ingrained in our day to day life that one cannot even comprehend that any alternatives exist. Ambedkar had tried to show an alternative way out, and it only speaks of the deep-rootedness of the system when all we remember Dr. Ambedkar for is writing the Constitution (albiet not a small feat by any stretch), while all his life he had worked to shake the society off from the chains of caste.</p>
|
||
<p>This annotated edition is the perfect way to educate oneself about the almost forgotten history of a radical man who dared to question the status quo and to demand justice, fighting not against a foreign invader but with his fellow countrymen, and who has been sidelined from every history book that is taught in the country.</p>
|
||
<p>Caste is part and parcel of a Hindu life. I did not realize or experience this until I entered college. Although it remains rather concealed amongst students, it reared its ugly head whenever the matter of reservation (Affirmative action in west) was discussed. Arundhati Roy put this brilliantly in her forward:</p>
|
||
<blockquote>
|
||
<p>‘Merit’ is the weapon of choice for an Indian elite that has dominated a system by allegedly divine authorisation, and denied knowledge—of certain kinds—to the subordinated castes for thousands of years. Now that it is being challenged, there have been passionate privileged-caste protests against the policy of reservation in government jobs and student quotas in universities. The presumption is that ‘merit’ exists in an ahistorical social vacuum and that the advantages that come from privileged-caste social networking and the establishment’s entrenched hostility towards the subordinated castes are not factors that deserve consideration. In truth, ‘merit’ has become a euphemism for nepotism.</p>
|
||
</blockquote>
|
||
<p>Even now when I no longer believe in religion (Hinduism was never my religion, it was my parents’ religion which I inherited, much like everyone else), I still get asked for my “last name” as a proxy for my caste. It is so seeped into our consciousness that we can’t help but feel a reverence whenever we come across someone from a “higher caste”, or to feel discomfort when we meet someone from a “lower caste”. This prejudice even trumps religious beliefs in India - even though their
|
||
scriptures don’t sanction it, the elite Muslims, Sikhs and Christians all practice caste discrimination.</p>
|
||
<p>The arguments put forward by Ambedkar for breaking up the entire caste system is a brilliant demonstration of the crystal-clear thinking of a man who left such a huge legacy on the Indian subcontinent and made sure that the future of India is steered in the right direction. He is criticised for asking for a radical transformation of society when India needed to unite everyone to win its freedom. What these criticisms seem to miss is that every radical man/woman is considered
|
||
radical precisely because i) they go against the cultural norms and ii) they question the deep-rooted prejudiced beliefs. There will never come an “appropriate” time for reforms, as is sadly evident with the still prevalent caste discrimination almost 90 years after Ambedkar decided to storm the gates.</p>
|
||
<p>It’s a travesty that he still remains, for the large part, forgotten.</p>
|
||
|
||
|
||
</div>
|
||
|
||
<footer class="post-footer">
|
||
<ul class="post-tags">
|
||
<li><a href="https://www.siddharthagolu.com/tags/non-fiction/">non-fiction</a></li>
|
||
<li><a href="https://www.siddharthagolu.com/tags/indian-authors/">indian-authors</a></li>
|
||
<li><a href="https://www.siddharthagolu.com/tags/religion/">religion</a></li>
|
||
<li><a href="https://www.siddharthagolu.com/tags/favourites/">favourites</a></li>
|
||
</ul>
|
||
<nav class="paginav">
|
||
<a class="prev" href="https://www.siddharthagolu.com/posts/reading/running-murakami/">
|
||
<span class="title">« Prev</span>
|
||
<br>
|
||
<span>What I Talk About When I Talk About Running by Haruki Murakami</span>
|
||
</a>
|
||
<a class="next" href="https://www.siddharthagolu.com/posts/reading/parenting/">
|
||
<span class="title">Next »</span>
|
||
<br>
|
||
<span>Parenting Beyond Belief by Dale McGowan</span>
|
||
</a>
|
||
</nav>
|
||
|
||
</footer>
|
||
|
||
<hr>
|
||
<section class="webring">
|
||
<h3 class="header">Articles from blogs I follow around the net</h3>
|
||
<section class="articles">
|
||
|
||
<div class="article">
|
||
<h4 class="title">
|
||
<a href="https://www.lilysthings.org/blog/discord-dialup/" target="_blank" rel="noopener">Dial-up over a Discord Call</a>
|
||
</h4>
|
||
<p class="summary">
|
||
|
||
Comments
|
||
</p>
|
||
<small class="source">
|
||
via <a href="https://lobste.rs/">Lobsters</a>
|
||
</small>
|
||
<small class="date">December 22, 2023</small>
|
||
</div>
|
||
|
||
<div class="article">
|
||
<h4 class="title">
|
||
<a href="https://www.benkuhn.net/newmgr/" target="_blank" rel="noopener">Some mistakes I made as a new manager</a>
|
||
</h4>
|
||
<p class="summary">the trough of zero dopamine • managing the wrong amount • procrastinating on hard questions • indefinitely deferring maintenance • angsting instead of asking</p>
|
||
<small class="source">
|
||
via <a href="https://www.benkuhn.net/">benkuhn.net</a>
|
||
</small>
|
||
<small class="date">April 23, 2023</small>
|
||
</div>
|
||
|
||
<div class="article">
|
||
<h4 class="title">
|
||
<a href="https://www.joelonsoftware.com/2022/12/19/progress-on-the-block-protocol/" target="_blank" rel="noopener">Progress on the Block Protocol</a>
|
||
</h4>
|
||
<p class="summary">Since the 1990s, the web has been a publishing place for human-readable documents. Documents published on the web are in HTML. HTML has a little bit of… Read more "Progress on the Block Protocol"</p>
|
||
<small class="source">
|
||
via <a href="https://www.joelonsoftware.com">Joel on Software</a>
|
||
</small>
|
||
<small class="date">December 19, 2022</small>
|
||
</div>
|
||
|
||
</section>
|
||
<p class="attribution">
|
||
Generated by
|
||
<a href="https://git.sr.ht/~sircmpwn/openring">openring</a>
|
||
</p>
|
||
</section>
|
||
<style>
|
||
.webring .header {
|
||
margin: 0 0 12px;
|
||
}
|
||
.webring .articles {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
margin: -0.5rem;
|
||
}
|
||
.webring .title {
|
||
margin: 4px 0 12px;
|
||
}
|
||
.webring .article {
|
||
flex: 1 1 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
margin: 0.5rem;
|
||
padding: 0.5rem;
|
||
background: var(--openring-bg);
|
||
min-width: 10rem;
|
||
}
|
||
.webring .summary {
|
||
font-size: 0.8rem;
|
||
flex: 1 1 0;
|
||
}
|
||
.webring .attribution {
|
||
text-align: right;
|
||
font-size: 0.8rem;
|
||
color: #555;
|
||
}
|
||
</style>
|
||
|
||
<details>
|
||
<summary>Comments</summary><script data-isso="https://comments.siddharthagolu.com/" src="https://comments.siddharthagolu.com/js/embed.min.js"></script>
|
||
<section id = "isso-thread"></section>
|
||
|
||
</details>
|
||
</article>
|
||
</main>
|
||
|
||
<footer class="footer">
|
||
<span>© 2024 <a href="https://www.siddharthagolu.com/">Siddhartha Golu</a></span>
|
||
<span>
|
||
Powered by
|
||
<a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a> &
|
||
<a href="https://github.com/adityatelange/hugo-PaperMod/" rel="noopener" target="_blank">PaperMod</a>
|
||
</span>
|
||
</footer>
|
||
<a href="#top" aria-label="go to top" title="Go to Top (Alt + G)" class="top-link" id="top-link" accesskey="g">
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6" fill="currentColor">
|
||
<path d="M12 6H0l6-6z" />
|
||
</svg>
|
||
</a>
|
||
|
||
<script>
|
||
let menu = document.getElementById('menu')
|
||
if (menu) {
|
||
menu.scrollLeft = localStorage.getItem("menu-scroll-position");
|
||
menu.onscroll = function () {
|
||
localStorage.setItem("menu-scroll-position", menu.scrollLeft);
|
||
}
|
||
}
|
||
|
||
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
||
anchor.addEventListener("click", function (e) {
|
||
e.preventDefault();
|
||
var id = this.getAttribute("href").substr(1);
|
||
if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
|
||
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView({
|
||
behavior: "smooth"
|
||
});
|
||
} else {
|
||
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView();
|
||
}
|
||
if (id === "top") {
|
||
history.replaceState(null, null, " ");
|
||
} else {
|
||
history.pushState(null, null, `#${id}`);
|
||
}
|
||
});
|
||
});
|
||
|
||
</script>
|
||
<script>
|
||
var mybutton = document.getElementById("top-link");
|
||
window.onscroll = function () {
|
||
if (document.body.scrollTop > 800 || document.documentElement.scrollTop > 800) {
|
||
mybutton.style.visibility = "visible";
|
||
mybutton.style.opacity = "1";
|
||
} else {
|
||
mybutton.style.visibility = "hidden";
|
||
mybutton.style.opacity = "0";
|
||
}
|
||
};
|
||
|
||
</script>
|
||
<script>
|
||
document.getElementById("theme-toggle").addEventListener("click", () => {
|
||
if (document.body.className.includes("dark")) {
|
||
document.body.classList.remove('dark');
|
||
localStorage.setItem("pref-theme", 'light');
|
||
} else {
|
||
document.body.classList.add('dark');
|
||
localStorage.setItem("pref-theme", 'dark');
|
||
}
|
||
})
|
||
|
||
</script>
|
||
<script>
|
||
document.querySelectorAll('pre > code').forEach((codeblock) => {
|
||
const container = codeblock.parentNode.parentNode;
|
||
|
||
const copybutton = document.createElement('button');
|
||
copybutton.classList.add('copy-code');
|
||
copybutton.innerHTML = 'copy';
|
||
|
||
function copyingDone() {
|
||
copybutton.innerHTML = 'copied!';
|
||
setTimeout(() => {
|
||
copybutton.innerHTML = 'copy';
|
||
}, 2000);
|
||
}
|
||
|
||
copybutton.addEventListener('click', (cb) => {
|
||
if ('clipboard' in navigator) {
|
||
navigator.clipboard.writeText(codeblock.textContent);
|
||
copyingDone();
|
||
return;
|
||
}
|
||
|
||
const range = document.createRange();
|
||
range.selectNodeContents(codeblock);
|
||
const selection = window.getSelection();
|
||
selection.removeAllRanges();
|
||
selection.addRange(range);
|
||
try {
|
||
document.execCommand('copy');
|
||
copyingDone();
|
||
} catch (e) { };
|
||
selection.removeRange(range);
|
||
});
|
||
|
||
if (container.classList.contains("highlight")) {
|
||
container.appendChild(copybutton);
|
||
} else if (container.parentNode.firstChild == container) {
|
||
|
||
} else if (codeblock.parentNode.parentNode.parentNode.parentNode.parentNode.nodeName == "TABLE") {
|
||
|
||
codeblock.parentNode.parentNode.parentNode.parentNode.parentNode.appendChild(copybutton);
|
||
} else {
|
||
|
||
codeblock.parentNode.appendChild(copybutton);
|
||
}
|
||
});
|
||
</script>
|
||
</body>
|
||
|
||
</html>
|