Mistral Chat PWA

Install Mistral Chat as a standalone app

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name        Mistral Chat PWA
// @description Install Mistral Chat as a standalone app
// @version     1.0.1
// @match       https://chat.mistral.ai/chat*
// @namespace   https://breat.fr
// @homepageURL https://usercssjs.breat.fr/m/mistral-chat
// @supportURL  https://discord.gg/W7FKesJ9aG
// @author      BreatFR
// @copyright   2025, BreatFR (https://breat.fr)
// @icon        https://breat.fr/static/images/userscripts-et-userstyles/m/mistral-chat/icon.png
// @license     AGPL-3.0-or-later; https://www.gnu.org/licenses/agpl-3.0.txt
// @grant       none
// ==/UserScript==

(function() {
    'use strict';

    // Replace title
    function replaceTitle() {
        if  (window.matchMedia('(display-mode: standalone)').matches) {
            document.title  =  "Mistral AI";
        }
    }

    // Add manifest
    const manifestLink = document.createElement('link');
    manifestLink.crossorigin = 'anonymous';
    manifestLink.href = 'https://code.breat.fr/m/mistral-chat/json/manifest.json';
    manifestLink.rel = 'manifest';

    manifestLink.onerror = function() {
        console.error("Failed to load the manifest file.");
    };

    document.head.appendChild(manifestLink);
    window.addEventListener('load', replaceTitle);

    setInterval(replaceTitle, 100);

    console.log("Manifest added and title replaced!");
})();