Translation
About Disclaimer Privacy Policy Terms Case Removal Blog Share URL Mobile View
(function() { const shareBtn = document.getElementById('share-url-btn'); if (navigator.share) { shareBtn.style.display = 'inline-block'; shareBtn.addEventListener('click', async function() { try { await navigator.share({ title: document.title, url: window.location.href }); } catch (err) { if (err.name !== 'AbortError') { console.error('Error sharing:', err); } } }); } })(); (function($) { function ensureAutocompleteAvailable() { if (!($.ui && $.ui.autocomplete)) { throw new Error('jQuery UI Autocomplete plugin not loaded'); } } function overrideGlobalRenderer() { $.ui.autocomplete.prototype._renderItem = function(ul, item) { return $(" ") .append( $("
") .addClass("search-autocomplete-item-wrapper") .html(item.label) ) .appendTo(ul); }; } function attachAutocomplete($input) { if (!$input.length) { return; } var $form = $input.closest('form'); $input.autocomplete({ source: "/qsuggest/", delay: 180, minLength: 2, appendTo: 'body', position: { my: "left top", at: "left bottom+6", collision: "flipfit" }, classes: { "ui-autocomplete": "search-autocomplete-list", "ui-menu-item-wrapper": "search-autocomplete-item" }, open: function() { var $menu = $input.autocomplete('widget'); var offset = $input.offset(); $menu .width($input.outerWidth()) .css({ left: offset.left, top: offset.top + $input.outerHeight() + 6 }); $input.addClass('autocomplete-open'); }, close: function() { $input.removeClass('autocomplete-open'); }, focus: function(event, ui) { // Prevent the default text replacement while navigating suggestions if (ui && ui.item) { event.preventDefault(); } }, select: function(event, ui) { event.preventDefault(); if (ui && ui.item) { $input.val(ui.item.value); } if ($form.length) { $form.trigger('submit'); } else { $('#search-form').trigger('submit'); } } }); } $(document).ready(function() { ensureAutocompleteAvailable(); overrideGlobalRenderer(); attachAutocomplete($("#search-box")); attachAutocomplete($("#header-search-box")); }); })(jQuery); $(document).ready(function() { $('#pdfdoc').button({icons: {primary: 'ui-icon-document'}}); $('#printdoc').button({icons: {primary: 'ui-icon-print'}}); $('#courtcopysubmit').button({icons: {primary: 'ui-icon-arrowthickstop-1-s'}}); $('#courtcopyform').submit(function(e) { signupForDownload(); e.preventDefault(); return false; }); $('#translatewarn').click(function(e) { e.preventDefault(); var params = {title: 'Warning on translation', closeText: "", width: 450}; var content = '
The option to translate the legal documents is to overcome language barriers and for broader understanding but should not be considered as authoritative text for any official purpose.
As pointed out, translation of legal texts may be inaccurate. So beware of it when using the translate feature. Lastly, translations here are provided by Google Translate and we do not warrant its accuracy.
'; modify_dialog_params(params); $('
').html(content).dialog(params); }); }); function googleTranslateElementInit() { var translateElementId = 'google_translate_element'; var translateContainer = document.getElementById(translateElementId); if (!translateContainer) { console.warn('Google Translate container not found; skipping widget init.'); return; } if (typeof google === 'undefined' || !google.translate || !google.translate.TranslateElement) { console.error('Google Translate API failed to load'); return; } new google.translate.TranslateElement({pageLanguage: 'en'}, translateElementId); function removeUnwantedText() { var translateEl = document.getElementById(translateElementId); if (!translateEl) { console.warn('Google Translate element became unavailable; skipping cleanup.'); return; } var pattern = /(translate|powered\s+by)/gi; var hideStyle = 'display:none;visibility:hidden;width:0;height:0;padding:0;margin:0'; var walker = document.createTreeWalker(translateEl, NodeFilter.SHOW_TEXT, null, false); var node; while (node = walker.nextNode()) { if (pattern.test(node.textContent)) { node.textContent = node.textContent.replace(pattern, '').replace(/\s+/g, ' ').trim(); } } translateEl.querySelectorAll('*').forEach(function(el) { if (el.querySelector('select') || el.querySelector('img')) return; var text = el.textContent || ''; if (pattern.test(text) && text.trim()) { el.textContent = text.replace(pattern, '').trim(); if (!el.textContent.trim()) { el.style.cssText = hideStyle; } } }); } setTimeout(removeUnwantedText, 200); } $(document).ready(function () { $('#translatewarn').button({icons: {primary: 'ui-icon-info'}, text: false}); $('.searchbox_top a').button(); $('#casemonitor').button({icon: 'ui-icon-alert'}).click({ valid_ag: '', is_valid: '', is_auth: 'False', is_agreement: '', headline: 'judgments that cite this document. Query alert for' }, registerEmailAlert); }); // Authentication context for chatbot window.is_auth = false; // Document context for chatbot window.documentContext = { tid: 14357908, title: "The Income Tax Act, 2025", url: window.location.href, isFragment: false }; // Point the widget to the existing API endpoints