Meta Tag Generator – Free Online SEO Meta Tags

JU TOOLS STUDIO • TEXT & SEO SEO Title, Description, Canonical, Open Graph & Twitter Cards
⚡ Instant 🔒 Free & Private All 151 Tools ↗

This free Meta Tag Generator gives you instant, dependable results right inside your web browser. Whether you need a quick SEO meta tags check or a reliable title tag maker solution, the interactive workspace above is ready immediately. Furthermore, it handles description generator tasks and html meta tags checks without sign-ups, watermarks, or confusing menus. Moreover, every input updates directly inside your browser. Consequently, you receive clean results immediately on mobile phones, tablets, and desktop computers.

What Is the Meta Tag Generator and Why Use It?

A dependable Meta Tag Generator streamlines your editorial and search optimization workflow by replacing manual guesswork with verified standards. For example, students, working professionals, and digital creators frequently search for a fast SEO meta tags or webmaster tools meta utility during tight deadlines. Instead of installing heavy desktop software, you can complete your title tag maker task in seconds.

In addition, accuracy matters whenever numbers, files, or technical formats are involved. Therefore, our engineering desk built this utility around documented Google Search Central supported meta tags reference principles. As a result, whether you run a quick google seo tags check or a detailed keyword tag generator review, every output stays transparent and reproducible.

How to Use This Meta Tag Generator Step by Step

Getting accurate output for any description generator or html meta tags task takes three straightforward steps in the tool above:

  1. Step 1: First, enter your page title, 120–158 character summary, canonical URL, and robots indexing directive.
  2. Step 2: Next, add an Open Graph 1200×630 social image URL and toggle Desktop vs Mobile SERP preview.
  3. Step 3: Finally, copy the generated HTML5 block and paste it into your site template or CMS.

Afterward, you can adjust any setting, compare alternative options, or download and copy your result immediately. Similarly, mobile visitors get touch-friendly controls that fit cleanly on any screen without horizontal scrolling.

SERP Pixel-Width Estimation, Canonical & Open Graph Markup

Google truncates desktop titles by rendered pixel width (~580 px) rather than raw character count. For example, wide letters like W use ~13.5 px, while narrow letters like i use ~4.6 px. Meanwhile, meta descriptions fit cleanly within 120 to 158 characters alongside Open Graph tags.

Because our Meta Tag Generator applies these rules automatically, you avoid manual rounding mistakes. Furthermore, users looking for meta property creator or SEO website tool workflows can test multiple scenarios side by side before finalizing their work.

Meta Tag Generator infographic illustrating SEO meta tags, title tag maker, description generator and html meta tags benchmarks
Key reference metrics and practical benchmarks for our browser-based Meta Tag Generator.

Practical Use Cases for SEO Meta Tags & Daily Work

First, university students and exam applicants regularly rely on this tool when preparing portal submissions, assignments, and project reports. Second, office teams use its title tag maker and description generator capabilities to standardize daily deliverables without switching between multiple tabs. Third, freelancers and site owners use html meta tags and open graph generator options to verify quality before publishing or sharing files.

In addition, you can pair this page with other verified utilities in our complete online tools and calculators directory:

Important Scope, Privacy & Accuracy Notes

Clean and meta description tags give search engines strong default snippet candidates. However, Google rewrites roughly 60% of SERP snippets dynamically to match specific user queries. Also note that Google completely ignores the legacy <meta name="keywords"> tag for ranking.</p> <p class="wp-block-paragraph">For full details on how our independent newsroom builds and maintains public utilities, please visit our <a href="https://jammuuniversity.in/editorial-policy/">Editorial Policy</a> and <a href="https://jammuuniversity.in/privacy-policy/">Privacy Policy</a>.</p> <h2 class="wp-block-heading">Frequently Asked Questions</h2> <h3 class="wp-block-heading">Is this Meta Tag Generator completely free to use?</h3> <p class="wp-block-paragraph">Yes. Every feature in the interactive workspace above is 100% free with zero registration walls, daily caps, or hidden watermarks. Therefore, you can run unlimited <strong>SEO meta tags</strong> checks on desktop or mobile devices.</p> <h3 class="wp-block-heading">How does the tool protect my privacy and data?</h3> <p class="wp-block-paragraph">Your privacy comes first. Local browser execution keeps sensitive inputs on your own device whenever possible, and temporary network checks never store personal documents. Consequently, your <strong>title tag maker</strong> workflow stays private and fast.</p> <h3 class="wp-block-heading">Can I use it on Android, iPhone, and desktop browsers?</h3> <p class="wp-block-paragraph">Absolutely. The responsive layout adapts automatically to smartphones, tablets, laptops, and widescreen monitors. Moreover, modern Chrome, Safari, Edge, and Firefox browsers support all <strong>description generator</strong> and <strong>html meta tags</strong> controls natively.</p> </div> </article> </div> </div> </main> <div class="ju-container ju-pre-footer-ad-wrap"> <div class="ju-ad-slot code-block ju-ad-slot-footer_banner" role="complementary" aria-label="Advertisement"><span class="ju-ad-label code-block-label">ADVERTISEMENT</span><div class="ju-ad-inner"><!-- jammu ads --> <ins class="adsbygoogle" style="display:block;width:100%;max-width:100%;" data-ad-client="ca-pub-3332655006707468" data-ad-slot="3283062390" data-ad-format="auto" data-full-width-responsive="true"></ins></div></div></div> <footer class="ju-site-footer" role="contentinfo"> <div class="ju-container"> <!-- TIER 1: COMPACT BRAND MASTHEAD + WHATSAPP CHANNEL + SOCIAL & TOP ACTIONS --> <div class="ju-footer-masthead"> <div class="ju-footer-brand-block"> <a href="https://jammuuniversity.in/" class="ju-footer-logo-link" aria-label="Jammu University Home"> <img src="https://jammuuniversity.in/wp-content/themes/generatepress-child/assets/images/logo-primary-dark.svg?v=3.4" alt="Jammu University" width="250" height="38" loading="lazy" decoding="async" /> </a> <div class="ju-footer-brand-meta"> <span class="ju-footer-trust-badge"> <span class="ju-footer-live-dot" aria-hidden="true"></span> VERIFIED NEWSROOM & STUDENT PORTAL </span> <p class="ju-footer-tagline"> Fast Jammu University Results, COE Date Sheets, Admit Cards, Sarkari Exams & Verified J&K / National Journalism. </p> </div> </div> <div class="ju-footer-actions-block"> <a href="https://whatsapp.com/channel/0029VaB1mZP4tRrxa0ej8O3w" target="_blank" rel="noopener noreferrer" class="ju-footer-wa-btn" aria-label="Join Official WhatsApp Channel"> <svg width="15" height="15" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12.031 6.172c-3.181 0-5.767 2.586-5.768 5.766-.001 1.298.38 2.27 1.019 3.287l-.582 2.128 2.182-.573c.978.58 1.911.928 3.145.929 3.178 0 5.767-2.587 5.768-5.766.001-3.187-2.575-5.77-5.764-5.771zm3.392 8.244c-.144.405-.837.774-1.17.824-.299.045-.677.063-1.092-.069-.252-.08-.575-.187-.988-.365-1.739-.751-2.874-2.502-2.961-2.617-.087-.116-.708-.94-.708-1.793s.448-1.273.607-1.446c.159-.173.346-.217.462-.217l.332.006c.106.005.249-.04.39.298.144.347.491 1.2.534 1.287.043.087.072.188.014.304-.058.116-.087.188-.173.289l-.26.304c-.087.086-.177.18-.076.354.101.174.449.741.964 1.201.662.591 1.221.774 1.394.86s.274.072.376-.043c.101-.116.433-.506.549-.68.116-.173.231-.145.39-.087s1.011.477 1.184.564.289.13.332.202c.045.072.045.419-.1.824zm-3.423-14.416c-6.627 0-12 5.373-12 12 0 2.625.846 5.059 2.284 7.033l-1.492 5.451 5.581-1.464c.912 1.252 4.195 1.98 6.627 1.98 6.627 0 12-5.373 12-12s-5.373-12-12-12z"/></svg> <span>Join WhatsApp</span> </a> <div class="ju-footer-social-strip" aria-label="Official Social Media Channels"> <a href="https://x.com/" target="_blank" rel="noopener noreferrer" class="ju-footer-social-icon" aria-label="X (Twitter)" title="X (Twitter)"> <svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg> </a> <a href="https://facebook.com/" target="_blank" rel="noopener noreferrer" class="ju-footer-social-icon" aria-label="Facebook" title="Facebook"> <svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12c0 4.991 3.657 9.128 8.438 9.878v-6.987h-2.54V12h2.54V9.797c0-2.506 1.492-3.89 3.777-3.89 1.094 0 2.238.195 2.238.195v2.46h-1.26c-1.243 0-1.63.771-1.63 1.562V12h2.773l-.443 2.89h-2.33v6.988C18.343 21.128 22 16.991 22 12z"/></svg> </a> <a href="https://youtube.com/" target="_blank" rel="noopener noreferrer" class="ju-footer-social-icon" aria-label="YouTube" title="YouTube"> <svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"/></svg> </a> <a href="https://jammuuniversity.in/feed.xml" class="ju-footer-social-icon" aria-label="RSS Feed" title="RSS Feed"> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" aria-hidden="true"><path d="M4 11a9 9 0 0 1 9 9"/><path d="M4 4a16 16 0 0 1 16 16"/><circle cx="5" cy="19" r="1"/></svg> </a> </div> <a href="#top" class="ju-footer-top-btn" aria-label="Back to Top"> <span>↑</span> Top </a> </div> </div> <!-- TIER 2: HIGH-DENSITY 4-COLUMN MATRIX (STUDENT HUB | 16 NEWS DESKS | EDITORIAL | CONTACT CARD) --> <div class="ju-footer-matrix"> <!-- Col 1: Student & Examination Quick Portal --> <div class="ju-footer-col"> <h2 class="ju-footer-heading">Student & Exam Portal</h2> <ul class="ju-footer-links"> <li><a href="https://jammuuniversity.in/category/education/results/">JU Semester Results 2026 <span class="ju-footer-mini-badge">LIVE</span></a></li> <li><a href="https://jammuuniversity.in/category/education/exams/">COE Date Sheet & Time Table</a></li> <li><a href="https://jammuuniversity.in/category/education/admit-cards/">Admit Card & Hall Tickets</a></li> <li><a href="https://jammuuniversity.in/category/education/admissions/">UG / PG Admissions (CUET)</a></li> <li><a href="https://jammuuniversity.in/category/education/syllabus/">CBCS & NEP 2020 Syllabus</a></li> <li><a href="https://jammuuniversity.in/tag/sarkari-result/">Sarkari Result & Merit Lists</a></li> <li><a href="https://jammuuniversity.in/category/jobs-and-careers/">Govt Jobs (JKSSB / JKPSC)</a></li> <li><a href="https://jammuuniversity.in/category/education/scholarships/">Scholarships & Fellowships</a></li> <li><a href="https://jammuuniversity.in/calculators/">Free Online Calculators</a></li> </ul> </div> <!-- Col 2: 16 Newsroom Desks in Compact 2-Column Sub-Grid --> <div class="ju-footer-col"> <h2 class="ju-footer-heading">Newsroom Desks</h2> <ul class="ju-footer-links ju-footer-links-2col"> <li><a href="https://jammuuniversity.in/category/india/">India News</a></li> <li><a href="https://jammuuniversity.in/category/india/jammu-kashmir/">Jammu & Kashmir</a></li> <li><a href="https://jammuuniversity.in/category/regional-news/">Regional News</a></li> <li><a href="https://jammuuniversity.in/category/education/">Education</a></li> <li><a href="https://jammuuniversity.in/category/world/">World News</a></li> <li><a href="https://jammuuniversity.in/category/politics/">Politics</a></li> <li><a href="https://jammuuniversity.in/category/business/">Business</a></li> <li><a href="https://jammuuniversity.in/category/finance/">Finance</a></li> <li><a href="https://jammuuniversity.in/category/technology/">Technology</a></li> <li><a href="https://jammuuniversity.in/category/science/">Science</a></li> <li><a href="https://jammuuniversity.in/category/sports/">Sports</a></li> <li><a href="https://jammuuniversity.in/category/health/">Health</a></li> <li><a href="https://jammuuniversity.in/category/environment/">Environment</a></li> <li><a href="https://jammuuniversity.in/category/automobile/">Automobile</a></li> <li><a href="https://jammuuniversity.in/category/entertainment/">Entertainment</a></li> <li><a href="https://jammuuniversity.in/category/opinion/">Opinion</a></li> </ul> </div> <!-- Col 3: Editorial & Company Standards --> <div class="ju-footer-col"> <h2 class="ju-footer-heading">Editorial & Company</h2> <ul class="ju-footer-links"> <li><a href="https://jammuuniversity.in/about-us/">About Jammu University News</a></li> <li><a href="https://jammuuniversity.in/our-editorial-team/">Our Editorial Team</a></li> <li><a href="https://jammuuniversity.in/editorial-policy/">Editorial Policy & Standards</a></li> <li><a href="https://jammuuniversity.in/fact-checking-policy/">Fact-Checking Policy</a></li> <li><a href="https://jammuuniversity.in/corrections-policy/">Corrections Policy</a></li> <li><a href="https://jammuuniversity.in/ethics-policy/">Journalistic Ethics Policy</a></li> <li><a href="https://jammuuniversity.in/advertise-with-us/">Advertise With Us</a></li> <li><a href="https://jammuuniversity.in/careers/">Careers & Internships</a></li> </ul> </div> <!-- Col 4: Newsroom Contact & Reader Services Card --> <div class="ju-footer-col"> <h2 class="ju-footer-heading">Newsroom & Reader Desk</h2> <!--email_off--> <div class="ju-footer-contact-card"> <div class="ju-footer-contact-row"> <span class="ju-footer-contact-label">Editorial Desk</span> <a href="https://jammuuniversity.in/contact-us/" class="ju-footer-contact-val">editorial@jammuuniversity.in</a> </div> <div class="ju-footer-contact-row"> <span class="ju-footer-contact-label">Fact-Check / Corrections</span> <a href="https://jammuuniversity.in/corrections-policy/" class="ju-footer-contact-val">corrections@jammuuniversity.in</a> </div> <div class="ju-footer-contact-row"> <span class="ju-footer-contact-label">Bureau Edition</span> <span class="ju-footer-contact-text">Jammu & Kashmir, India</span> </div> <div class="ju-footer-utility-pills"> <a href="https://jammuuniversity.in/contact-us/">Contact Us</a> <a href="https://jammuuniversity.in/bookmarks/">Bookmarks</a> <a href="https://jammuuniversity.in/my-account/">My Account</a> <a href="https://jammuuniversity.in/feedback/">Feedback</a> </div> </div> <!--/email_off--> </div> </div> <!-- TIER 3: HORIZONTAL LEGAL, COMPLIANCE & SITEMAP BAR + COPYRIGHT --> <div class="ju-footer-legal-bar"> <nav class="ju-footer-legal-nav" aria-label="Legal, Privacy and Sitemap Links"> <a href="https://jammuuniversity.in/privacy-policy/">Privacy Policy</a> <a href="https://jammuuniversity.in/terms-and-conditions/">Terms & Conditions</a> <a href="https://jammuuniversity.in/cookie-policy/">Cookie Policy</a> <a href="https://jammuuniversity.in/disclaimer/">Disclaimer</a> <a href="https://jammuuniversity.in/advertising-policy/">Advertising Policy</a> <a href="https://jammuuniversity.in/copyright-policy/">Copyright</a> <a href="https://jammuuniversity.in/dmca-copyright-complaints/">DMCA</a> <a href="https://jammuuniversity.in/community-guidelines/">Community Guidelines</a> <a href="https://jammuuniversity.in/accessibility-statement/">Accessibility</a> <a href="https://jammuuniversity.in/account-deletion-and-data-requests/">Data Requests</a> <a href="https://jammuuniversity.in/html-sitemap/">HTML Sitemap</a> <a href="https://jammuuniversity.in/sitemap.xml">XML Sitemap</a> <a href="https://jammuuniversity.in/news-sitemap.xml">Google News Sitemap</a> <a href="https://jammuuniversity.in/rss-feeds/">RSS Feeds</a> </nav> <div class="ju-footer-copy-row"> <span>© 2026 <strong>Jammu University</strong> (jammuuniversity.in). All rights reserved. Independent Digital Newsroom & Student Information Portal.</span> <span class="ju-footer-perf-tag">Grade A++ Editorial Standards</span> </div> </div> </div> </footer> <!-- Mobile App-Style Fixed Bottom Navigation Bar (Home | Latest | Categories | Search | Account) --> <nav class="ju-mobile-bottom-bar ju-ad-mobile-only" aria-label="Mobile Bottom App Navigation"> <a href="https://jammuuniversity.in/" class="ju-mobile-bottom-item "> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg> <span>Home</span> </a> <a href="https://jammuuniversity.in/category/latest-news/" class="ju-mobile-bottom-item "> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg> <span>Latest</span> </a> <button type="button" class="ju-mobile-bottom-item" data-ju-open-mobile-drawer="1" aria-label="Browse All Categories"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/></svg> <span>Categories</span> </button> <button type="button" class="ju-mobile-bottom-item" data-ju-open-mobile-search="1" aria-label="Search Stories"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg> <span>Search</span> </button> <a href="https://jammuuniversity.in/my-account/" class="ju-mobile-bottom-item "> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg> <span>Account</span> </a> </nav> <!-- Accessible Modal for Reporting a Correction --> <div id="ju-correction-modal" role="dialog" aria-modal="true" aria-labelledby="ju-corr-modal-title" style="display:none;position:fixed;inset:0;background:rgba(15,23,42,0.72);z-index:3000;align-items:center;justify-content:center;padding:16px;"> <div style="background:var(--ju-bg-surface);color:var(--ju-text-primary);max-width:520px;width:100%;border-radius:8px;padding:24px;box-shadow:var(--ju-shadow-lg);"> <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;"> <h3 id="ju-corr-modal-title" style="margin:0;">Report a Factual Correction</h3> <button type="button" id="ju-close-correction-modal" class="ju-icon-btn" aria-label="Close Modal">✕</button> </div> <p style="font-size:0.85rem;color:var(--ju-text-secondary);margin-bottom:14px;"> Article: <strong id="ju-correction-post-title"></strong> </p> <form id="ju-correction-form" style="display:flex;flex-direction:column;gap:10px;"> <input type="hidden" id="ju-correction-post-id" name="post_id" value="" /> <label style="font-size:0.82rem;font-weight:600;">Your Name <input type="text" name="corr_name" required class="ju-search-input" style="width:100%;margin-top:4px;" /> </label> <label style="font-size:0.82rem;font-weight:600;">Your Email <input type="email" name="corr_email" required class="ju-search-input" style="width:100%;margin-top:4px;" /> </label> <label style="font-size:0.82rem;font-weight:600;">Describe the Error & Official Source Reference <textarea name="corr_details" rows="3" required class="ju-search-input" style="width:100%;margin-top:4px;"></textarea> </label> <button type="submit" class="ju-btn ju-btn-primary">Submit to Fact-Check Desk</button> <div id="ju-correction-response" style="font-size:0.84rem;font-weight:600;" aria-live="polite"></div> </form> </div> </div> <script id="ju-news-platform-js">window.JUNewsConfig={"restUrl":"https://jammuuniversity.in/wp-json/junews/v1","siteUrl":"https://jammuuniversity.in/","enableInfiniteArticle":true,"adsenseClient":"ca-pub-3332655006707468"};(function () {'use strict';const config = window.JUNewsConfig || {restUrl: '/wp-json/junews/v1',siteUrl: window.location.origin,enableInfiniteArticle: true };const htmlEl = document.documentElement;const savedFont = localStorage.getItem('ju_font_scale');const savedContrast = localStorage.getItem('ju_high_contrast');if (savedFont) {htmlEl.classList.remove('ju-font-sm', 'ju-font-lg', 'ju-font-xl');if (savedFont !== 'normal') htmlEl.classList.add(savedFont);}if (savedContrast === '1') {htmlEl.classList.add('ju-high-contrast');}document.addEventListener('click', function (e) {const fontBtn = e.target.closest('[data-ju-font]');if (fontBtn) {const scale = fontBtn.getAttribute('data-ju-font');htmlEl.classList.remove('ju-font-sm', 'ju-font-lg', 'ju-font-xl');if (scale !== 'normal') htmlEl.classList.add(scale);localStorage.setItem('ju_font_scale', scale);document.querySelectorAll('[data-ju-font]').forEach(function (b) {b.classList.toggle('active', b === fontBtn);});}const contrastBtn = e.target.closest('[data-ju-contrast]');if (contrastBtn) {const isHigh = htmlEl.classList.toggle('ju-high-contrast');localStorage.setItem('ju_high_contrast', isHigh ? '1' : '0');contrastBtn.setAttribute('aria-pressed', isHigh ? 'true' : 'false');contrastBtn.classList.toggle('active', isHigh);}});const siteHeader = document.querySelector('.ju-site-header');const navWrap = document.getElementById('ju-main-nav-wrap');const navPlaceholder = document.getElementById('ju-nav-placeholder');const mobileCatTrack = document.querySelector('.ju-mobile-cat-track');if (mobileCatTrack) {const activePill = mobileCatTrack.querySelector('.ju-mobile-cat-pill.is-active');if (activePill) {setTimeout(function () {const scrollLeft = activePill.offsetLeft - (mobileCatTrack.clientWidth / 2) + (activePill.offsetWidth / 2);if (scrollLeft > 0) {mobileCatTrack.scrollTo({ left: scrollLeft, behavior: 'smooth' });}}, 60);}}let navOffsetTop = navWrap ? navWrap.offsetTop : 90;function syncStickyHeaders() {const isMobile = window.innerWidth <= 768;if (isMobile && siteHeader) {siteHeader.classList.toggle('is-mobile-scrolled', window.scrollY > 10);const wpAdminBar = document.getElementById('wpadminbar');if (wpAdminBar) {const abHeight = wpAdminBar.offsetHeight || 46;if (window.innerWidth <= 600) {siteHeader.style.top = Math.max(0, abHeight - window.scrollY) + 'px';} else {siteHeader.style.top = abHeight + 'px';}} else {siteHeader.style.top = '0px';}return;}if (siteHeader) {siteHeader.style.top = '';siteHeader.classList.remove('is-mobile-scrolled');}if (navWrap && navPlaceholder) {if (window.scrollY > navOffsetTop) {if (!navWrap.classList.contains('is-sticky')) {navWrap.classList.add('is-sticky');navPlaceholder.classList.add('is-active');}} else {if (navWrap.classList.contains('is-sticky')) {navWrap.classList.remove('is-sticky');navPlaceholder.classList.remove('is-active');}}}}syncStickyHeaders();window.addEventListener('scroll', syncStickyHeaders, { passive: true });window.addEventListener('load', syncStickyHeaders);window.addEventListener('resize', function () {if (navWrap && navPlaceholder) {navWrap.classList.remove('is-sticky');navPlaceholder.classList.remove('is-active');navOffsetTop = navWrap.offsetTop;}syncStickyHeaders();});const searchToggle = document.getElementById('ju-search-toggle');const searchDrawer = document.getElementById('ju-search-drawer');const searchInput = document.getElementById('ju-live-search-input');const suggestBox = document.getElementById('ju-search-suggestions');const headerSearchInput = document.getElementById('ju-header-search-input');const headerSearchClear = document.getElementById('ju-header-search-clear');const headerSuggestBox = document.getElementById('ju-header-search-suggestions');if (searchToggle && searchDrawer) {searchToggle.addEventListener('click', function () {const open = searchDrawer.classList.toggle('is-open');searchToggle.setAttribute('aria-expanded', open ? 'true' : 'false');if (open && searchInput) {setTimeout(function () { searchInput.focus(); }, 50);}});}function bindLiveSearch(inputEl, resultsEl, clearBtn) {if (!inputEl || !resultsEl) return;let timer = null;if (clearBtn) {clearBtn.style.display = inputEl.value.length > 0 ? 'inline-block' : 'none';clearBtn.addEventListener('click', function () {inputEl.value = '';clearBtn.style.display = 'none';resultsEl.classList.remove('is-visible');resultsEl.innerHTML = '';inputEl.focus();});}inputEl.addEventListener('input', function () {const q = inputEl.value.trim();if (clearBtn) {clearBtn.style.display = inputEl.value.length > 0 ? 'inline-block' : 'none';}clearTimeout(timer);if (q.length < 2) {resultsEl.classList.remove('is-visible');resultsEl.innerHTML = '';return;}timer = setTimeout(function () {fetch(config.restUrl + '/search-suggest?q=' + encodeURIComponent(q)) .then(function (r) { return r.json(); }) .then(function (data) {if (!data.items || !data.items.length) {resultsEl.innerHTML = '<div class="ju-suggest-item"><span>No instant matches found. Press Enter for full search.</span></div>';resultsEl.classList.add('is-visible');return;}resultsEl.innerHTML = data.items.map(function (item) {return '<a class="ju-suggest-item" href="' + item.url + '">' + '<div><span class="ju-cat-pill" style="margin-right:8px;margin-bottom:0;">' + item.type + '</span>' + '<strong>' + item.title + '</strong></div>' + '<span style="font-size:0.75rem;color:var(--ju-text-muted);white-space:nowrap;">' + item.date + '</span>' + '</a>';}).join('');resultsEl.classList.add('is-visible');}) .catch(function () {});}, 220);});}bindLiveSearch(searchInput, suggestBox, null);bindLiveSearch(headerSearchInput, headerSuggestBox, headerSearchClear);document.addEventListener('click', function (e) {if (suggestBox && !e.target.closest('#ju-search-drawer')) {suggestBox.classList.remove('is-visible');}if (headerSuggestBox && !e.target.closest('.ju-masthead-search')) {headerSuggestBox.classList.remove('is-visible');}});const mobileOpenBtn = document.getElementById('ju-mobile-menu-open');const mobileCloseBtn = document.getElementById('ju-mobile-menu-close');const mobileDrawer = document.getElementById('ju-mobile-drawer');if (mobileOpenBtn && mobileDrawer) {mobileOpenBtn.addEventListener('click', function () {mobileDrawer.classList.add('is-open');mobileOpenBtn.setAttribute('aria-expanded', 'true');});}if (mobileCloseBtn && mobileDrawer) {mobileCloseBtn.addEventListener('click', function () {mobileDrawer.classList.remove('is-open');if (mobileOpenBtn) mobileOpenBtn.setAttribute('aria-expanded', 'false');});}if (mobileDrawer) {mobileDrawer.addEventListener('click', function (e) {if (e.target === mobileDrawer) {mobileDrawer.classList.remove('is-open');if (mobileOpenBtn) mobileOpenBtn.setAttribute('aria-expanded', 'false');}});}document.addEventListener('keydown', function (e) {if (e.key === 'Escape' && mobileDrawer && mobileDrawer.classList.contains('is-open')) {mobileDrawer.classList.remove('is-open');if (mobileOpenBtn) mobileOpenBtn.setAttribute('aria-expanded', 'false');}});document.addEventListener('click', function (e) {if (e.target.closest('[data-ju-open-mobile-drawer]') && mobileDrawer) {mobileDrawer.classList.add('is-open');if (mobileOpenBtn) mobileOpenBtn.setAttribute('aria-expanded', 'true');}if (e.target.closest('[data-ju-open-mobile-search]') && searchDrawer) {searchDrawer.classList.add('is-open');window.scrollTo({ top: 0, behavior: 'smooth' });if (searchInput) setTimeout(function () { searchInput.focus(); }, 120);}const accBtn = e.target.closest('[data-ju-drawer-acc]');if (accBtn) {const item = accBtn.closest('.ju-ht-acc-item');if (item) {const isOpen = item.classList.toggle('is-open');accBtn.setAttribute('aria-expanded', isOpen ? 'true' : 'false');}}});function getBookmarks() {try {return JSON.parse(localStorage.getItem('ju_saved_bookmarks') || '[]');} catch (e) {return [];}}function saveBookmarks(list) {localStorage.setItem('ju_saved_bookmarks', JSON.stringify(list));}function syncBookmarkButtons() {const list = getBookmarks();const ids = list.map(function (x) { return String(x.id); });document.querySelectorAll('.ju-bookmark-btn').forEach(function (btn) {const pid = String(btn.getAttribute('data-post-id'));const saved = ids.indexOf(pid) !== -1;btn.classList.toggle('is-bookmarked', saved);btn.innerHTML = saved ? '★ <span>Saved</span>' : '☆ <span>Save</span>';});const bmContainer = document.getElementById('ju-bookmarks-page-list');if (bmContainer) {if (!list.length) {bmContainer.innerHTML = '<p style="padding:20px;background:var(--ju-bg-subtle);border-radius:6px;">You have not bookmarked any stories yet. Click the <strong>Save</strong> button on any article to read it later.</p>';} else {bmContainer.innerHTML = '<ul class="ju-compact-list">' + list.map(function (item) {return '<li class="ju-compact-item" style="justify-content:space-between;align-items:center;">' + '<div><h3 class="ju-compact-title" style="font-size:1.05rem;"><a href="' + item.url + '">' + item.title + '</a></h3>' + '<span style="font-size:0.78rem;color:var(--ju-text-muted);">Saved on ' + (item.date || 'Recently') + '</span></div>' + '<button type="button" class="ju-btn ju-btn-outline ju-bookmark-btn" data-post-id="' + item.id + '" data-post-title="' + item.title + '" data-post-url="' + item.url + '">Remove</button>' + '</li>';}).join('') + '</ul>';}}}syncBookmarkButtons();document.addEventListener('click', function (e) {const bmBtn = e.target.closest('.ju-bookmark-btn');if (bmBtn) {const id = String(bmBtn.getAttribute('data-post-id'));const title = bmBtn.getAttribute('data-post-title') || document.title;const url = bmBtn.getAttribute('data-post-url') || window.location.href;let list = getBookmarks();const existsIdx = list.findIndex(function (x) { return String(x.id) === id; });if (existsIdx !== -1) {list.splice(existsIdx, 1);} else {list.unshift({ id: id, title: title, url: url, date: new Date().toLocaleDateString() });}saveBookmarks(list);syncBookmarkButtons();}const copyBtn = e.target.closest('.ju-copy-link-btn');if (copyBtn) {const url = copyBtn.getAttribute('data-url') || window.location.href;if (navigator.clipboard && navigator.clipboard.writeText) {navigator.clipboard.writeText(url).then(function () {const orig = copyBtn.textContent;copyBtn.textContent = 'Copied!';setTimeout(function () { copyBtn.textContent = orig; }, 1800);});}}});document.addEventListener('submit', function (e) {const form = e.target.closest('.ju-newsletter-form');if (!form) return;e.preventDefault();const emailInput = form.querySelector('input[type="email"]');const msgEl = form.querySelector('.ju-newsletter-msg');if (!emailInput) return;fetch(config.restUrl + '/newsletter', {method: 'POST',headers: { 'Content-Type': 'application/json' },body: JSON.stringify({ email: emailInput.value.trim() }) }) .then(function (r) { return r.json(); }) .then(function (res) {if (msgEl) {msgEl.textContent = res.message || 'Subscribed!';msgEl.style.color = res.success ? '#15803d' : '#b91c1c';}if (res.success) emailInput.value = '';}) .catch(function () {});});const corrModal = document.getElementById('ju-correction-modal');const corrForm = document.getElementById('ju-correction-form');const corrPostId = document.getElementById('ju-correction-post-id');const corrPostTitle = document.getElementById('ju-correction-post-title');const corrMsg = document.getElementById('ju-correction-response');document.addEventListener('click', function (e) {const openBtn = e.target.closest('.ju-open-correction-btn');if (openBtn && corrModal) {if (corrPostId) corrPostId.value = openBtn.getAttribute('data-post-id') || '';if (corrPostTitle) corrPostTitle.textContent = openBtn.getAttribute('data-post-title') || '';if (corrMsg) corrMsg.textContent = '';corrModal.style.display = 'flex';}if (e.target.closest('#ju-close-correction-modal') || e.target === corrModal) {if (corrModal) corrModal.style.display = 'none';}});if (corrForm) {corrForm.addEventListener('submit', function (e) {e.preventDefault();const payload = {post_id: corrPostId ? corrPostId.value : 0,name: corrForm.querySelector('[name="corr_name"]').value,email: corrForm.querySelector('[name="corr_email"]').value,details: corrForm.querySelector('[name="corr_details"]').value };fetch(config.restUrl + '/report-correction', {method: 'POST',headers: { 'Content-Type': 'application/json' },body: JSON.stringify(payload) }) .then(function (r) { return r.json(); }) .then(function (res) {if (corrMsg) {corrMsg.textContent = res.message || 'Submitted.';corrMsg.style.color = res.success ? '#15803d' : '#b91c1c';}if (res.success) corrForm.reset();});});}const streamContainer = document.getElementById('ju-infinite-article-stream');const loadMoreBtn = document.getElementById('ju-load-next-article-btn');const sentinel = document.getElementById('ju-infinite-sentinel');if (streamContainer && loadMoreBtn) {const loadedIds = new Set();const initialArticle = document.querySelector('.ju-trackable-article');let lastPostId = initialArticle ? parseInt(initialArticle.getAttribute('data-article-id'), 10) : 0;if (lastPostId) loadedIds.add(lastPostId);let isLoading = false;let reachedEnd = false;const maxAppended = 5;const articleObserver = new IntersectionObserver(function (entries) {entries.forEach(function (entry) {if (entry.isIntersecting && entry.intersectionRatio >= 0.25) {const art = entry.target;const url = art.getAttribute('data-article-url');const title = art.getAttribute('data-article-title');if (url && window.location.href !== url) {window.history.replaceState({ articleUrl: url }, title || document.title, url);if (title) document.title = title;}}});}, { threshold: [0.25, 0.6] });if (initialArticle) {articleObserver.observe(initialArticle);}function loadNextArticle() {if (isLoading || reachedEnd || loadedIds.size > maxAppended) return;isLoading = true;loadMoreBtn.textContent = 'Loading Next Story...';loadMoreBtn.disabled = true;const excludeParam = Array.from(loadedIds).join(',');fetch(config.restUrl + '/next-article?current_id=' + encodeURIComponent(lastPostId) + '&exclude=' + encodeURIComponent(excludeParam)) .then(function (r) { return r.json(); }) .then(function (data) {isLoading = false;if (!data || !data.found || !data.html) {reachedEnd = true;loadMoreBtn.textContent = 'You have reached the latest stories in this section';loadMoreBtn.disabled = true;return;}const postId = parseInt(data.post_id, 10);if (loadedIds.has(postId)) {reachedEnd = true;loadMoreBtn.style.display = 'none';return;}loadedIds.add(postId);lastPostId = postId;const wrapper = document.createElement('div');wrapper.innerHTML = data.html;streamContainer.appendChild(wrapper);const newArticle = wrapper.querySelector('.ju-trackable-article');if (newArticle) {articleObserver.observe(newArticle);}syncBookmarkButtons();if (typeof hydrateLazyImages === 'function') hydrateLazyImages(wrapper);if (typeof hydrateAdSenseSlots === 'function') hydrateAdSenseSlots(wrapper);if (loadedIds.size > maxAppended) {reachedEnd = true;loadMoreBtn.textContent = 'Continue exploring stories via Category sections below';loadMoreBtn.disabled = true;} else {loadMoreBtn.textContent = 'Load Next Story ↓';loadMoreBtn.disabled = false;}}) .catch(function () {isLoading = false;loadMoreBtn.textContent = 'Load Next Story ↓';loadMoreBtn.disabled = false;});}loadMoreBtn.addEventListener('click', loadNextArticle);if (sentinel && config.enableInfiniteArticle) {const sentinelObserver = new IntersectionObserver(function (entries) {if (entries[0].isIntersecting && userHasInteracted && !isLoading && !reachedEnd) {loadNextArticle();}}, { rootMargin: '320px 0px' });sentinelObserver.observe(sentinel);}}let archiveInfiniteObserver = null;function triggerArchiveInfiniteLoad(loadBtn) {if (!loadBtn || loadBtn.disabled || loadBtn.getAttribute('data-all-loaded') === '1') return;const targetSelector = loadBtn.getAttribute('data-target') || '#ju-archive-posts-grid';const grid = document.querySelector(targetSelector);if (!grid) return;const catId = loadBtn.getAttribute('data-category-id') || '0';const tagId = loadBtn.getAttribute('data-tag-id') || '0';const authorId = loadBtn.getAttribute('data-author-id') || '0';const searchQ = loadBtn.getAttribute('data-search') || '';const perPage = parseInt(loadBtn.getAttribute('data-per-page') || '6', 10);let offset = parseInt(loadBtn.getAttribute('data-offset') || '0', 10);const existingIds = new Set( (loadBtn.getAttribute('data-exclude') || '') .split(',') .map(function (x) { return parseInt(x, 10); }) .filter(Boolean) );grid.querySelectorAll('[data-post-id]').forEach(function (card) {const cid = parseInt(card.getAttribute('data-post-id') || '0', 10);if (cid > 0) existingIds.add(cid);});const origText = loadBtn.getAttribute('data-label') || 'Load More Stories ↓';loadBtn.textContent = 'Loading More Stories...';loadBtn.disabled = true;const params = new URLSearchParams({category_id: catId,tag_id: tagId,author_id: authorId,search: searchQ,offset: String(offset),per_page: String(perPage),exclude: Array.from(existingIds).join(',') });fetch(config.restUrl + '/load-more-posts?' + params.toString()) .then(function (r) { return r.json(); }) .then(function (data) {if (!data || !data.found || !data.html) {loadBtn.textContent = 'All Stories Loaded';loadBtn.setAttribute('data-all-loaded', '1');loadBtn.disabled = true;loadBtn.style.display = 'none';const sentinel = loadBtn.closest('#ju-category-infinite-sentinel');if (sentinel) sentinel.style.display = 'none';return;}const temp = document.createElement('div');temp.innerHTML = data.html;let appendedCount = 0;while (temp.firstElementChild) {const el = temp.firstElementChild;const pid = parseInt(el.getAttribute('data-post-id') || '0', 10);if (pid > 0 && (existingIds.has(pid) || grid.querySelector('[data-post-id="' + pid + '"]'))) {temp.removeChild(el);continue;}if (pid > 0) existingIds.add(pid);grid.appendChild(el);appendedCount++;}if (Array.isArray(data.post_ids)) {data.post_ids.forEach(function (id) { existingIds.add(parseInt(id, 10)); });}loadBtn.setAttribute('data-exclude', Array.from(existingIds).join(','));loadBtn.setAttribute('data-offset', String(offset + (data.count || perPage)));syncBookmarkButtons();if (typeof hydrateLazyImages === 'function') hydrateLazyImages(grid);if (typeof hydrateAdSenseSlots === 'function') hydrateAdSenseSlots(grid);if (typeof updateSmartStickySidebars === 'function') {updateSmartStickySidebars();}if (!data.has_more || appendedCount === 0) {loadBtn.textContent = 'All Stories Loaded';loadBtn.setAttribute('data-all-loaded', '1');loadBtn.disabled = true;loadBtn.style.display = 'none';const sentinel = loadBtn.closest('#ju-category-infinite-sentinel');if (sentinel) sentinel.style.display = 'none';} else {loadBtn.textContent = origText;loadBtn.disabled = false;if (archiveInfiniteObserver) {archiveInfiniteObserver.unobserve(loadBtn);setTimeout(function () {if (loadBtn.getAttribute('data-all-loaded') !== '1') {archiveInfiniteObserver.observe(loadBtn);}}, 120);}}}) .catch(function () {loadBtn.textContent = origText;loadBtn.disabled = false;});}function checkArchiveInfiniteScrollProximity() {if (document.body.classList.contains('home') || document.body.classList.contains('front-page')) return;document.querySelectorAll('.ju-load-more-archive-btn[data-infinite="1"]').forEach(function (btn) {if (btn.disabled || btn.getAttribute('data-all-loaded') === '1') return;const rect = btn.getBoundingClientRect();if (rect.top <= (window.innerHeight + 650)) {triggerArchiveInfiniteLoad(btn);}});}document.addEventListener('click', function (e) {const loadBtn = e.target.closest('.ju-load-more-archive-btn');if (loadBtn && !loadBtn.disabled) {triggerArchiveInfiniteLoad(loadBtn);}});window.addEventListener('scroll', checkArchiveInfiniteScrollProximity, { passive: true });const authorSearchInput = document.getElementById('ju-author-dir-search');const authorDirectoryList = document.getElementById('ju-authors-directory-list') || document.getElementById('ju-authors-dir-list');const authorEmptyMsg = document.getElementById('ju-authors-empty-msg');const authorCountLabel = document.getElementById('ju-authors-count-label');let activeAzLetter = 'ALL';function filterAuthorsDirectory() {if (!authorDirectoryList) return;const query = authorSearchInput ? authorSearchInput.value.trim().toLowerCase() : '';const cards = authorDirectoryList.querySelectorAll('.ju-ht-author-row-card');let visibleCount = 0;cards.forEach(function (card) {const nameAndDesk = (card.getAttribute('data-author-name') || card.getAttribute('data-author-search') || '').toLowerCase();const letter = card.getAttribute('data-author-letter') || '';const matchesSearch = !query || nameAndDesk.indexOf(query) !== -1;const matchesAz = activeAzLetter === 'ALL' || letter === activeAzLetter;if (matchesSearch && matchesAz) {card.style.display = 'flex';visibleCount++;} else {card.style.display = 'none';}});if (authorEmptyMsg) {authorEmptyMsg.style.display = visibleCount === 0 ? 'block' : 'none';}if (authorCountLabel) {authorCountLabel.textContent = 'All Authors (' + visibleCount + ')';}}if (authorSearchInput) {authorSearchInput.addEventListener('input', filterAuthorsDirectory);}function getFollowedAuthors() {try {return JSON.parse(localStorage.getItem('ju_followed_authors') || '[]');} catch (e) {return [];}}function syncFollowAuthorButtons() {const followed = getFollowedAuthors();document.querySelectorAll('[data-follow-author]').forEach(function (btn) {const aid = String(btn.getAttribute('data-follow-author'));const isFollowed = followed.indexOf(aid) !== -1;btn.classList.toggle('is-following', isFollowed);btn.setAttribute('aria-pressed', isFollowed ? 'true' : 'false');const txtEl = btn.querySelector('.ju-ht-follow-text');const plusEl = btn.querySelector('.ju-ht-follow-plus');if (txtEl && plusEl) {txtEl.textContent = isFollowed ? 'Following' : 'Follow';plusEl.textContent = isFollowed ? '✓' : '+';} else {btn.innerHTML = isFollowed ? '<span class="ju-ht-follow-text">Following</span> <span class="ju-ht-follow-plus">✓</span>' : '<span class="ju-ht-follow-text">Follow</span> <span class="ju-ht-follow-plus">+</span>';}});}syncFollowAuthorButtons();document.addEventListener('click', function (e) {const azBtn = e.target.closest('[data-az-filter]');if (azBtn) {activeAzLetter = azBtn.getAttribute('data-az-filter') || 'ALL';document.querySelectorAll('[data-az-filter]').forEach(function (b) {b.classList.toggle('is-active', b === azBtn);});filterAuthorsDirectory();}const followBtn = e.target.closest('[data-follow-author]');if (followBtn) {const aid = String(followBtn.getAttribute('data-follow-author'));const aname = followBtn.getAttribute('data-author-title') || 'this journalist';const followed = getFollowedAuthors();const idx = followed.indexOf(aid);let action = 'follow';if (idx !== -1) {followed.splice(idx, 1);action = 'unfollow';} else {followed.push(aid);}localStorage.setItem('ju_followed_authors', JSON.stringify(followed));syncFollowAuthorButtons();const savedEmail = localStorage.getItem('ju_follower_email') || '';fetch(config.restUrl + '/follow-author', {method: 'POST',headers: { 'Content-Type': 'application/json' },body: JSON.stringify({ author_id: aid, action: action, email: savedEmail }) }).catch(function () {});showFollowAuthorToast(aid, aname, action === 'follow', savedEmail);}});function showFollowAuthorToast(authorId, authorName, isFollowing, savedEmail) {let toast = document.getElementById('ju-author-follow-toast');if (!toast) {toast = document.createElement('div');toast.id = 'ju-author-follow-toast';toast.style.cssText = 'position:fixed;bottom:24px;right:24px;z-index:3500;max-width:380px;width:calc(100% - 32px);background:#0f172a;color:#ffffff;padding:16px 18px;border-radius:10px;box-shadow:0 12px 28px rgba(15,23,42,0.35);border-left:4px solid #00acc1;font-size:0.86rem;line-height:1.45;';document.body.appendChild(toast);}if (!isFollowing) {toast.innerHTML = '<div style="display:flex;justify-content:space-between;align-items:center;"><span>Unfollowed <strong>' + authorName + '</strong>.</span><button type="button" onclick="this.parentElement.parentElement.style.display=\'none\'" style="background:none;border:none;color:#94a3b8;cursor:pointer;font-size:1rem;">×</button></div>';toast.style.display = 'block';setTimeout(function () { toast.style.display = 'none'; }, 3000);return;}toast.innerHTML = '<div style="display:flex;justify-content:space-between;align-items:flex-start;gap:8px;margin-bottom:8px;">' + '<div><strong style="color:#38bdf8;">Following ✓</strong> You are now following <strong>' + authorName + '</strong>.</div>' + '<button type="button" onclick="this.parentElement.parentElement.style.display=\'none\'" style="background:none;border:none;color:#94a3b8;cursor:pointer;font-size:1.1rem;line-height:1;">×</button>' + '</div>' + (savedEmail ? '<div style="font-size:0.78rem;color:#cbd5e1;">Instant story updates enabled for <strong>' + savedEmail + '</strong>.</div>' : '<form id="ju-follow-email-form" style="display:flex;gap:6px;margin-top:8px;">' + '<input type="email" required placeholder="Enter email for instant story alerts..." style="flex:1;padding:7px 10px;border-radius:5px;border:1px solid #475569;background:#1e293b;color:#fff;font-size:0.8rem;" />' + '<button type="submit" style="background:#00acc1;color:#fff;border:none;border-radius:5px;padding:7px 12px;font-weight:700;font-size:0.78rem;cursor:pointer;">Get Updates</button>' + '</form>');toast.style.display = 'block';const form = toast.querySelector('#ju-follow-email-form');if (form) {form.addEventListener('submit', function (ev) {ev.preventDefault();const em = form.querySelector('input[type="email"]').value.trim();if (!em) return;localStorage.setItem('ju_follower_email', em);fetch(config.restUrl + '/follow-author', {method: 'POST',headers: { 'Content-Type': 'application/json' },body: JSON.stringify({ author_id: authorId, action: 'follow', email: em }) }).then(function () {toast.innerHTML = '<div style="color:#4ade80;font-weight:700;">✓ Subscribed! You will receive an email whenever ' + authorName + ' publishes a new article.</div>';setTimeout(function () { toast.style.display = 'none'; }, 3500);});});} else {setTimeout(function () { toast.style.display = 'none'; }, 4000);}}document.addEventListener('submit', function (e) {const form = e.target.closest('form');if (!form) return;const sInput = form.querySelector('input[name="s"]');if (!sInput) return;e.preventDefault();const rawQ = sInput.value.trim();if (!rawQ) return;const cleanSlug = encodeURIComponent(rawQ.replace(/\s+/g, ' '));const base = (config.siteUrl || window.location.origin).replace(/\/$/, '');window.location.href = base + '/search/' + cleanSlug + '/';});if (window.location.search && window.location.search.indexOf('?s=') !== -1) {const params = new URLSearchParams(window.location.search);const sVal = params.get('s');if (sVal) {const cleanPath = '/search/' + encodeURIComponent(sVal.trim()) + '/';window.history.replaceState({}, document.title, cleanPath);}}function updateSmartStickySidebars() {const sidebars = document.querySelectorAll('.ju-sticky-sidebar, .ju-ht-left-col');if (!sidebars.length) return;if (window.innerWidth < 1024) {sidebars.forEach(function (sb) { sb.style.top = ''; });return;}const headerOffset = 68;const bottomMargin = 24;const vh = window.innerHeight;sidebars.forEach(function (sb) {const sh = sb.offsetHeight;if (sh + headerOffset + bottomMargin > vh) {sb.style.top = Math.round(vh - sh - bottomMargin) + 'px';} else {sb.style.top = headerOffset + 'px';}});}updateSmartStickySidebars();window.addEventListener('load', updateSmartStickySidebars);window.addEventListener('resize', updateSmartStickySidebars);window.addEventListener('scroll', updateSmartStickySidebars, { passive: true });const prefetchedUrls = new Set();const supportsSpeculation = HTMLScriptElement.supports && HTMLScriptElement.supports('speculationrules');function prefetchArticleUrl(anchor) {if (!anchor || !anchor.href) return;if (prefetchedUrls.size >= 15) return;try {const u = new URL(anchor.href, window.location.origin);if (u.origin !== window.location.origin) return;if (u.pathname === window.location.pathname && !u.search) return;if (u.pathname.indexOf('/wp-') === 0 || u.search) return;if (prefetchedUrls.has(u.href)) return;prefetchedUrls.add(u.href);if (!supportsSpeculation) {const link = document.createElement('link');link.rel = 'prefetch';link.href = u.href;link.as = 'document';document.head.appendChild(link);}} catch (err) {}}document.addEventListener('mouseover', function (e) {const a = e.target.closest('a[href]');if (a) prefetchArticleUrl(a);}, { passive: true });document.addEventListener('touchstart', function (e) {const a = e.target.closest('a[href]');if (a) prefetchArticleUrl(a);}, { passive: true });let lazyImageObserver = null;let userHasInteracted = false;function loadLazyImage(img) {if (!img || img.classList.contains('is-loaded')) return;const realSrc = img.getAttribute('data-ju-src');if (!realSrc) return;const realSrcset = img.getAttribute('data-ju-srcset');const realSizes = img.getAttribute('data-ju-sizes');img.onload = function () {img.classList.add('is-loaded');};img.onerror = function () {img.classList.add('is-loaded');};if (realSizes) {img.setAttribute('sizes', realSizes);img.removeAttribute('data-ju-sizes');}if (realSrcset) {img.setAttribute('srcset', realSrcset);img.removeAttribute('data-ju-srcset');}img.setAttribute('src', realSrc);img.removeAttribute('data-ju-src');if (img.complete) {img.classList.add('is-loaded');}}function initLazyImageObserver() {if (lazyImageObserver) return;if ('IntersectionObserver' in window) {lazyImageObserver = new IntersectionObserver(function (entries) {entries.forEach(function (entry) {if (entry.isIntersecting) {loadLazyImage(entry.target);lazyImageObserver.unobserve(entry.target);}});}, { rootMargin: '360px 0px' });}}function hydrateLazyImages(rootEl) {const scope = rootEl || document;const imgs = scope.querySelectorAll('img.ju-lazy-img[data-ju-src]');if (!imgs.length) return;initLazyImageObserver();imgs.forEach(function (img) {if (lazyImageObserver) {lazyImageObserver.observe(img);} else {loadLazyImage(img);}});}let adsenseScriptInjected = false;let adSlotObserver = null;function ensureAdSenseScriptLoaded() {if (adsenseScriptInjected) return;adsenseScriptInjected = true;if (document.querySelector('script[src*="adsbygoogle.js"]')) return;const s = document.createElement('script');s.async = true;s.crossOrigin = 'anonymous';s.src = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=' + encodeURIComponent(config.adsenseClient || 'ca-pub-3332655006707468');document.head.appendChild(s);}function pushVisibleAdSlot(ins) {if (!ins || ins.getAttribute('data-ju-ad-pushed') === '1' || ins.getAttribute('data-adsbygoogle-status') || ins.getAttribute('data-ad-status')) return;if (ins.nextElementSibling && ins.nextElementSibling.tagName === 'SCRIPT' && ins.nextElementSibling.textContent.indexOf('adsbygoogle') !== -1) {ins.setAttribute('data-ju-ad-pushed', '1');return;}if (ins.offsetWidth <= 0) return;ensureAdSenseScriptLoaded();ins.setAttribute('data-ju-ad-pushed', '1');try {(window.adsbygoogle = window.adsbygoogle || []).push({});} catch (err) {}}function initAdSlotObserver() {if (adSlotObserver) return;if ('IntersectionObserver' in window) {adSlotObserver = new IntersectionObserver(function (entries) {entries.forEach(function (entry) {if (entry.isIntersecting) {pushVisibleAdSlot(entry.target);if (entry.target.getAttribute('data-ju-ad-pushed') === '1') {adSlotObserver.unobserve(entry.target);}}});}, { rootMargin: '350px 0px' });}}function hydrateAdSenseSlots(rootEl) {const scope = rootEl || document;const slots = scope.querySelectorAll('ins.adsbygoogle:not([data-ju-ad-pushed="1"]):not([data-adsbygoogle-status])');if (!slots.length) return;initAdSlotObserver();slots.forEach(function (ins) {if (ins.offsetWidth <= 0) return;if (adSlotObserver) {adSlotObserver.observe(ins);} else {pushVisibleAdSlot(ins);}});}function onFirstUserScrollOrInteraction(e) {if (userHasInteracted) return;if (e && e.type === 'scroll' && window.scrollY < 40) return;userHasInteracted = true;['scroll', 'wheel', 'touchstart', 'touchmove', 'mousemove', 'pointerdown', 'keydown', 'click'].forEach(function (evt) {window.removeEventListener(evt, onFirstUserScrollOrInteraction, { passive: true });});hydrateLazyImages(document);hydrateAdSenseSlots(document);}['scroll', 'wheel', 'touchstart', 'touchmove', 'mousemove', 'pointerdown', 'keydown', 'click'].forEach(function (evt) {window.addEventListener(evt, onFirstUserScrollOrInteraction, { passive: true });});})();</script> <script id="ju-tools-core-js-before"> window.JUToolsConfig = {"ajaxUrl":"https://jammuuniversity.in/wp-admin/admin-ajax.php","homeUrl":"https://jammuuniversity.in/","nonce":"dc6ccf21d3","slug":"meta-tag-generator","name":"Meta Tag Generator"}; //# sourceURL=ju-tools-core-js-before </script> <script data-wp-strategy="defer" defer id="ju-tools-core-js" src="https://jammuuniversity.in/wp-content/plugins/ju-tools-suite/assets/js/ju-tools-core.js?ver=2.0.0"></script> <script data-wp-strategy="defer" defer id="ju-tools-mod-text-js" src="https://jammuuniversity.in/wp-content/plugins/ju-tools-suite/assets/js/mod-text.js?ver=2.0.0"></script> <script type="speculationrules">{"prefetch":[{"source":"document","where":{"and":[{"href_matches":"/*"},{"not":{"href_matches":"/wp-*"}},{"not":{"href_matches":"/*\\?*"}},{"not":{"href_matches":"/*#*"}},{"not":{"selector_matches":"[rel~=nofollow], [target=_blank]"}}]},"eagerness":"moderate"}]}</script> </body> </html> <!-- Page optimized by LiteSpeed Cache @2026-10-31 22:44:33 --> <!-- Page cached by LiteSpeed Cache 7.9.2 on 2026-10-31 22:44:33 -->