Skip to main content

Office of the Attorney General, The Attorney General's Guide to Landlord and Tenant Rights

Citation
Office of the Attorney General, The Attorney General's Guide to Landlord and Tenant Rights
Jurisdiction
Greenfield (municipal)
Source
Official source

Related Parts of This Source

Full Text

1,503 chars
function clearGoogtransCookies() {
var hostname = window.location.hostname;
var cookieDomain = null;
if (hostname !== 'localhost' && !/^\d{1,3}(\.\d{1,3}){3}$/.test(hostname)) {
var parts = hostname.split('.');
cookieDomain = parts.length <= 2 ? '.' + hostname : '.' + parts.slice(-2).join('.');
}
document.cookie = 'googtrans=; path=/; expires=Thu, 01 Jan 1970 00:00:00 UTC;';
document.cookie = 'googtrans=; path=/; domain=' + hostname + '; expires=Thu, 01 Jan 1970 00:00:00 UTC;';
if (cookieDomain) {
document.cookie = 'googtrans=; path=/; domain=' + cookieDomain + '; expires=Thu, 01 Jan 1970 00:00:00 UTC;';
}
}

function isolateTranslateClick(event) {
if (event.massThemeTranslateClickRedispatched) {
return;
}
var target = event.target;
if (!target || !target.closest || !isTranslateUi(target)) {
return;
}

var resetButton = target.closest('#ma__translate-reset, .ma__translate-reset-button');
if (resetButton) {
event.preventDefault();
event.stopPropagation();
event.stopImmediatePropagation();
clearGoogtransCookies();
window.location.reload();
return;
}

if (target.closest('select, option, input, label')) {
return;
}

event.preventDefault();
event.stopPropagation();
event.stopImmediatePropagation();

var trigger = target.closest('[data-modal-trigger]');
if (trigger && !target.closest('.ma__modal--translate.ma__active')) {
var modalId = trigger.getAttribute('data-modal-trigger');
if (modalId && window.modals && window.modals[modalId]) {
window.modals[modalId].open(trigger);
return;
}
}