Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e90244d1 authored by Akhil's avatar Akhil 🙂
Browse files

(docs) add explanation about script to reload

parent 66dc5a5d
Loading
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
(function() {
	const OriginalXhr = window.XMLHttpRequest

	/**
	 *
	 */
	function PatchedXhr() {
		const xhr = new OriginalXhr()

		// We want to reload the page if password change request is successful
		xhr.addEventListener('load', function() {
			if (xhr.responseURL.includes('/settings/personal/changepassword') && xhr.status >= 200 && xhr.status < 300) {
				setTimeout(() => window.location.reload(), 1000)