Files
personal-website/public/posts/reading/chup-deepa-narayan/index.html

485 lines
30 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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>Chup: Breaking the Silence About India&#39;s Women by Deepa Narayan | Siddhartha Golu</title>
<meta name="keywords" content="non-fiction, indian-authors, favourites, feminism">
<meta name="description" content="A powerful exploration into the psyche of Indian women and how society perpetuates the status quo">
<meta name="author" content="Siddhartha Golu">
<link rel="canonical" href="https://www.siddharthagolu.com/posts/reading/chup-deepa-narayan/">
<link crossorigin="anonymous" href="/assets/css/stylesheet.66857e85d743ed43ea67ff6c21de89acf86c4e0d759944d3eed3e3cc709b1266.css" integrity="sha256-ZoV&#43;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><!-- isso -->
<script data-isso="https://comments.siddharthagolu.com/" src="https://comments.siddharthagolu.com/js/embed.min.js"></script>
<!-- end isso -->
<meta property="og:title" content="Chup: Breaking the Silence About India&#39;s Women by Deepa Narayan" />
<meta property="og:description" content="A powerful exploration into the psyche of Indian women and how society perpetuates the status quo" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://www.siddharthagolu.com/posts/reading/chup-deepa-narayan/" />
<meta property="og:image" content="https://www.siddharthagolu.com/posts/reading/chup-deepa-narayan/images/chup.jpg" /><meta property="article:section" content="posts" />
<meta property="article:published_time" content="2023-09-03T21:05:39+05:30" />
<meta property="article:modified_time" content="2023-10-03T09:42:51+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/chup-deepa-narayan/images/chup.jpg" />
<meta name="twitter:title" content="Chup: Breaking the Silence About India&#39;s Women by Deepa Narayan"/>
<meta name="twitter:description" content="A powerful exploration into the psyche of Indian women and how society perpetuates the status quo"/>
<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": "Chup: Breaking the Silence About India's Women by Deepa Narayan",
"item": "https://www.siddharthagolu.com/posts/reading/chup-deepa-narayan/"
}
]
}
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BlogPosting",
"headline": "Chup: Breaking the Silence About India's Women by Deepa Narayan",
"name": "Chup: Breaking the Silence About India\u0027s Women by Deepa Narayan",
"description": "A powerful exploration into the psyche of Indian women and how society perpetuates the status quo",
"keywords": [
"non-fiction", "indian-authors", "favourites", "feminism"
],
"articleBody": "Check it out on Goodreads\nIts a uniquely strange experience, when you try to put yourself into others shoes. It feels fake, dishonest even, to say that you “understand” how the other person must be feeling. Empathy can be a strong force, but it can never be a substitute for the original feeling. A caucasian man can never feel what an African-American man must be living with, day in and day out. Same thing between a Brahmin and a Dalit, and a man and a woman.\nWere swimming so deep into the ocean of privilege that a mere acknowledgment of it stands out. Nowhere have I found it to be so stark when thinking about gender. I was having a conversation with my partner the other day about how traveling solo is a lovely experience and the serendipity and chance encounters make up for a unique experience. She said that if she travelled solo, every minute she would be worrying about her safety and the thought would overpower any other experiences that shed be having. I wouldve never thought about my safety, she wouldve never thought about anything else.\nAll of this, just because I happened to be born a male.\nIve tried to educate myself over the years, mostly by reading books and interacting with others. “Chup” takes the leading place in that body of work which tries to show and explain gender imbalance. I came across the book when Alice Evans brought it up during an episode on the podcast The Seen and the Unseen (I cannot recommend this episode enough!). It comprises of a series of interviews taken of women who are feminist in belief but not in behaviour. These women are not explicitly suppressed or subjugated by patriarchal dominance, however it lays bare how generations of cultural and societal reinforcements dominate ones thoughts.\nThe author, Deepa Narayan, holds no bar when discussing how society trains women to be non-existent. She writes:\nDrawing on the details of the lives of women and men I interviewed, each over several hours, I found that girls are trained in seven cultural habits of non-existence. These are - deny the body; be quiet; please others; deny your sexuality; isolate yourself; have no individual identity; and be dependent. It is deep training in these habits that makes so many women feminists in belief but not in behaviour. Feminists with bad habits.\nTo summarize all the findings shared in the book would end up me just regurgitating the entire book. However, Ill try to highlight few points that stood out to me below:\nHow raising awareness about bias is not enough, that it can actually increase bias. “If everyone does it, why not me?” Only when the biases are labelled undesirable do they disappear.\nNo women used the word “ambitious” to describe herself, it is still a dirty word even for women who have taken a strong intellectual stance on equality. When we asked women about their biggest fear, it is invariably about loss of family and safety of family members, it is hardly ever about the self. This too makes sense. Most women are searching for freedom within families, not freedom from families.\nMen who argue are called leaders, while the language of war and weapons is frequently used when talking about women who argue.\nIn a land of 1.3 billion people, one can safely assume that sex is not a new discovery. Yet we still act like we found something novel.\nThe tendency to put a rug over or speak in a hush-hush voice about Menstruation. Think about it - its a routine, monthly process through which half of the population goes through every month for at least 30-40 years of their lives! Yet, women still feel ashamed to say “Im having my periods today”, instead opting for more benign “Im down today”.\nMen, on the other hand, have a lot of words for vaginas, none of which are used in polite company or denote respect. Most are used as swear words. This is true all over the world. Women whose mother tongue is Hindi or Punjabi are more comfortable saying the word vagina in English than the words in their native languages. It is safer saying the word in a foreign language than in the language of their own heavily shame/guilt/fear-laden native context of their childhood. This was true for women from the ages of 17 to over 65. Babies come out of the “susu wali jagah”.\nAt a Filmfare award night event screened on television, every major female superstar from Deepika Padukone to the young Alia Bhatt bent her whole body forward, head towards the lap, and covered her mouth with her hands while laughing, so that her face was almost hidden. None of the male stars did so they laughed heartily with their heads thrown back a little and mouths wide open.\nThe most institutionalized form of competition and meanness is evident in the saasbahu soap dramas, a response to a structured system in which women derive their power from competing and fighting for control over the same powerful man, the son/husband.\nThe first time I took the Implicit Gender Bias test available online, I was stunned. I discovered that I was biased against women. I took the test several times, but the results did not change. This means of course that I am biased against myself. My cultural habits went deeper than my intellectual awareness, my work and my commitment to equality.\nThis book has helped me notice my own biases against women. It has transformed the way I look at gender relations, and perhaps an unintended consequence, made me more hopeless about the state of affairs. Ive tried to circulate its copies to people close to me, not as a gesture of holier-than-thou “you should read this” frat boy attitude, but simply because I think this book deserves a wider audience.\nIf you want to explore more on some related topics, here are a few jumping off points.\nAlice Evans discussion with Amit Varma: https://seenunseen.in/episodes/2022/10/3/episode-297-alice-evans-studies-the-great-gender-divergence/ Mahima Vashishts Raja beta syndrome: https://womaning.substack.com/p/the-raja-beta-syndrome Puliyabaazi: Women hold up more than half the sky: https://puliyabaazi.in/video/96-aadhaa-aasmaa-women-hold-up-more-than-half-the-sky-ft-mahima-vashisht ",
"wordCount" : "1026",
"inLanguage": "en",
"image":"https://www.siddharthagolu.com/posts/reading/chup-deepa-narayan/images/chup.jpg","datePublished": "2023-09-03T21:05:39+05:30",
"dateModified": "2023-10-03T09:42:51+05:30",
"author":[{
"@type": "Person",
"name": "Siddhartha Golu"
}],
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://www.siddharthagolu.com/posts/reading/chup-deepa-narayan/"
},
"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 &#43; /)" 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>&nbsp;»&nbsp;<a href="https://www.siddharthagolu.com/posts/">Posts</a></div>
<h1 class="post-title entry-hint-parent">
Chup: Breaking the Silence About India&#39;s Women by Deepa Narayan
</h1>
<div class="post-meta"><span title='2023-09-03 21:05:39 +0530 IST'>🗓 September 3, 2023</span>&nbsp;·&nbsp;5 min&nbsp;·&nbsp;🔖&nbsp;<a href="/tags/non-fiction"> non-fiction</a>&nbsp;·&nbsp;<a href="/tags/indian-authors"> indian-authors</a>&nbsp;·&nbsp;<a href="/tags/favourites"> favourites</a>&nbsp;·&nbsp;<a href="/tags/feminism"> feminism</a>
</div>
</header>
<div class="post-content"><p><a href="https://www.goodreads.com/review/show/5107520435">Check it out on Goodreads</a></p>
<hr>
<p><img loading="lazy" src="/images/chup.jpg" alt="Chup Cover" title="Chup Cover" />
</p>
<p>It&rsquo;s a uniquely strange experience, when you try to put yourself into others&rsquo; shoes. It feels fake, dishonest even, to say that you &ldquo;understand&rdquo; how the other person must be feeling. Empathy can be a strong force, but it can never be a substitute for the original feeling. A caucasian man can never feel what an African-American man must be living with, day in and day out. Same thing between a Brahmin and a Dalit, and a man and a woman.</p>
<p>We&rsquo;re swimming so deep into the ocean of privilege that a mere acknowledgment of it stands out. Nowhere have I found it to be so stark when thinking about gender. I was having a conversation with my partner the other day about how traveling solo is a lovely experience and the serendipity and chance encounters make up for a unique experience. She said that if she travelled solo, every minute she would be worrying about her safety and the thought would overpower any other experiences that she&rsquo;d be having. I would&rsquo;ve never thought about my safety, she would&rsquo;ve never thought about anything else.</p>
<p>All of this, just because I happened to be born a male.</p>
<p>I&rsquo;ve tried to educate myself over the years, mostly by reading books and interacting with others. &ldquo;Chup&rdquo; takes the leading place in that body of work which tries to show and explain gender imbalance. I came across the book when Alice Evans brought it up during <a href="https://seenunseen.in/episodes/2022/10/3/episode-297-alice-evans-studies-the-great-gender-divergence/">an episode on the podcast The Seen and the Unseen</a> (I cannot recommend this episode enough!). It comprises of a series of interviews taken of women who are feminist in belief but not in behaviour. These women are not explicitly suppressed or subjugated by patriarchal dominance, however it lays bare how generations of cultural and societal reinforcements dominate one&rsquo;s thoughts.</p>
<p>The author, Deepa Narayan, holds no bar when discussing how society trains women to be non-existent. She writes:</p>
<blockquote>
<p>Drawing on the details of the lives of women and men I interviewed, each over several hours, I found that girls are trained in seven cultural habits of non-existence. These are - deny the body; be quiet; please others; deny your sexuality; isolate yourself; have no individual identity; and be dependent. It is deep training in these habits that makes so many women feminists in belief but not in behaviour. Feminists with bad habits.</p>
</blockquote>
<p>To summarize all the findings shared in the book would end up me just regurgitating the entire book. However, I&rsquo;ll try to highlight few points that stood out to me below:</p>
<blockquote>
<p>How raising awareness about bias is not enough, that it can actually increase bias. &ldquo;If everyone does it, why not me?&rdquo; Only when the biases are labelled undesirable do they disappear.</p>
</blockquote>
<blockquote>
<p>No women used the word &ldquo;ambitious&rdquo; to describe herself, it is still a dirty word even for women who have taken a strong intellectual stance on equality.
When we asked women about their biggest fear, it is invariably about loss of family and safety of family members, it is hardly ever about the self. This too makes sense. Most women are searching for freedom within families, not freedom from families.</p>
</blockquote>
<blockquote>
<p>Men who argue are called leaders, while the language of war and weapons is frequently used when talking about women who argue.</p>
</blockquote>
<blockquote>
<p>In a land of 1.3 billion people, one can safely assume that sex is not a new discovery. Yet we still act like we found something novel.</p>
</blockquote>
<blockquote>
<p>The tendency to put a rug over or speak in a hush-hush voice about Menstruation. Think about it - it&rsquo;s a routine, monthly process through which half of the population goes through every month for at least 30-40 years of their lives! Yet, women still feel ashamed to say &ldquo;I&rsquo;m having my periods today&rdquo;, instead opting for more benign &ldquo;I&rsquo;m down today&rdquo;.</p>
</blockquote>
<blockquote>
<p>Men, on the other hand, have a lot of words for vaginas, none of which are used in polite company or denote respect. Most are used as swear words. This is true all over the world. Women whose mother tongue is Hindi or Punjabi are more comfortable saying the word vagina in English than the words in their native languages. It is safer saying the word in a foreign language than in the language of their own heavily shame/guilt/fear-laden native context of their childhood. This was true for women from the ages of 17 to over 65. Babies come out of the &ldquo;susu wali jagah&rdquo;.</p>
</blockquote>
<blockquote>
<p>At a Filmfare award night event screened on television, every major female superstar from Deepika Padukone to the young Alia Bhatt bent her whole body forward, head towards the lap, and covered her mouth with her hands while laughing, so that her face was almost hidden. None of the male stars did so they laughed heartily with their heads thrown back a little and mouths wide open.</p>
</blockquote>
<blockquote>
<p>The most institutionalized form of competition and meanness is evident in the saasbahu soap dramas, a response to a structured system in which women derive their power from competing and fighting for control over the same powerful man, the son/husband.</p>
</blockquote>
<blockquote>
<p>The first time I took the Implicit Gender Bias test available online, I was stunned. I discovered that I was biased against women. I took the test several times, but the results did not change. This means of course that I am biased against myself. My cultural habits went deeper than my intellectual awareness, my work and my commitment to equality.</p>
</blockquote>
<p>This book has helped me notice my own biases against women. It has transformed the way I look at gender relations, and perhaps an unintended consequence, made me more hopeless about the state of affairs. I&rsquo;ve tried to circulate its copies to people close to me, not as a gesture of holier-than-thou &ldquo;you should read this&rdquo; frat boy attitude, but simply because I think this book deserves a wider audience.</p>
<p>If you want to explore more on some related topics, here are a few jumping off points.</p>
<ul>
<li>Alice Evan&rsquo;s discussion with Amit Varma: <a href="https://seenunseen.in/episodes/2022/10/3/episode-297-alice-evans-studies-the-great-gender-divergence/">https://seenunseen.in/episodes/2022/10/3/episode-297-alice-evans-studies-the-great-gender-divergence/</a></li>
<li>Mahima Vashisht&rsquo;s Raja beta syndrome: <a href="https://womaning.substack.com/p/the-raja-beta-syndrome">https://womaning.substack.com/p/the-raja-beta-syndrome</a></li>
<li>Puliyabaazi: Women hold up more than half the sky: <a href="https://puliyabaazi.in/video/96-aadhaa-aasmaa-women-hold-up-more-than-half-the-sky-ft-mahima-vashisht">https://puliyabaazi.in/video/96-aadhaa-aasmaa-women-hold-up-more-than-half-the-sky-ft-mahima-vashisht</a></li>
</ul>
</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/favourites/">favourites</a></li>
<li><a href="https://www.siddharthagolu.com/tags/feminism/">feminism</a></li>
</ul>
<nav class="paginav">
<a class="next" href="https://www.siddharthagolu.com/posts/reading/empire-of-pain/">
<span class="title">Next »</span>
<br>
<span>Empire of Pain: The Secret History of the Sackler Dynasty</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 &#34;Progress on the Block Protocol&#34;</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>
<!-- begin comments //-->
<section id = "isso-thread">
</section>
<!-- end comments //-->
</article>
</main>
<footer class="footer">
<span>&copy; 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>