Commit 54a246cc authored by Domi's avatar Domi

feat: support more language

parent df56514b
{
"tabWidth": 2,
"semi": false,
"useTabs": false
}
# Anything Copilot - Any web page as copilot
<div align="center">
<img width="200" src="public/logo.svg" alt="Logo">
<h1>Anything Copilot - Any web page as copilot</h1>
<p>Use the official ChatGPT website or any other webpage for free as your AI copilot, including GPTs, GPT-4, or any new features. </p>
</div>
Use the official ChatGPT website or any other webpage for free as your AI copilot, including GPTs, GPT-4, or any new features.
## Install/Download - Edge Add-ons & Chrome web store
- [Edge Add-ons](https://microsoftedge.microsoft.com/addons/detail/anything-copilot/lbeehbkcmjaopnlccpjcdgamcabhnanl)
- [Chrome web store](https://chromewebstore.google.com/u/1/detail/anything-copilot-any-web/lilckelmopbcffmglfmfhelaajhjpcff)
- [Edge Add-ons - Anything Copilot](https://microsoftedge.microsoft.com/addons/detail/anything-copilot/lbeehbkcmjaopnlccpjcdgamcabhnanl)
- [Chrome web store - Anything Copilot](https://chromewebstore.google.com/u/1/detail/anything-copilot-any-web/lilckelmopbcffmglfmfhelaajhjpcff)
This template should help get you started developing with Vue 3 in Vite.
Open any web page in a Copilot window and seamlessly multitask with other pages or applications.
## Screenshots & Video
<table>
<tr>
<td>
<img src="docs/assets/1280x800_1.png" alt="Anything Copilot screenshot 1" >
</td>
<td>
<img src="docs/assets/1280x800_2.png" alt="Anything Copilot screenshot 1" >
</td>
</tr>
</table>
[📺 Youtube - Anything Copilot demo](https://youtu.be/RnOUGg-WiH0?si=8YHPLGvczmUTsVqU)
## Recommended IDE Setup
......@@ -18,8 +37,8 @@ TypeScript cannot handle type information for `.vue` imports by default, so we r
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
1. Disable the built-in TypeScript Extension
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette
2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
## Customize configuration
......
......@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
<title>Anything Copilot</title>
</head>
<body>
<div id="app"></div>
......
......@@ -8,7 +8,7 @@ const manifest = {
// short_name: "__MSG_short_name__",
// no more than 132 characters
description: "__MSG_description__",
version: "1.1.1",
version: "1.1.2",
action: {
default_icon: {
16: "logo.png",
......
This diff is collapsed.
......@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
<title>Anything Copilot</title>
</head>
<body>
<div id="app"></div>
......
{
"name": {
"message": "Anything Copilot - የድርሻ ፕሌይን በተጠቀሰው የአንድ ጽ/ቤት"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "በቀጥታ ችሎታው ተጠቀሰ ከአስማዋ የ ChatGPT ድርጅትን ለመጠቀም ወደሚከተለው GPTs, GPT-4, ወይም የሞተ አጠቃላይ ድርሻ ለተቀጥለው ተጠቀሰው የ AI ፕሌይን ማጥፋት ይችላሉ።"
},
"toggle_minimize_desc": {
"message": "የርስ/የአጠቃላይ ሪዘምን መቀያ"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - أي صفحة ويب كمساعد"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "استخدم موقع ChatGPT الرسمي أو أي صفحة ويب أخرى مجانًا كمساعد ذكاء اصطناعي، بما في ذلك GPTs وGPT-4 وأي ميزات جديدة."
},
"toggle_minimize_desc": {
"message": "تبديل عرض/إخفاء نافذة المساعد"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Уеб приложение, AI съпилот"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Използвайте официалния уебсайт на ChatGPT или всяка друга уеб страница безплатно като вашия AI съпилот."
},
"toggle_minimize_desc": {
"message": "Превключване на показването/скриването на прозореца на Съпилот"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - ওয়েব অ্যাপ, এআই কো-পাইলট"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "অফিসিয়াল চ্যাটজিপিটি ওয়েবসাইট বা অন্য কোনও ওয়েবপেজ বিনামূল্যে আপনার এআই কো-পাইলট হিসাবে ব্যবহার করুন।"
},
"toggle_minimize_desc": {
"message": "কো-পাইলট উইন্ডো দেখার / আড়ালম্বন করার টগল করুন"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Assistent de multitasques"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Utilitza el lloc web oficial de ChatGPT o qualsevol altra pàgina web de franc com el teu copilot d'IA."
},
"toggle_minimize_desc": {
"message": "Commuta ocultar/mostrar finestra del Copilot"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Víceúlohový asistent"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Použijte oficiální webovou stránku ChatGPT nebo jakoukoli jinou webovou stránku jako svého AI spolujezdce."
},
"toggle_minimize_desc": {
"message": "Přepnout zobrazení/skrytí okna Spolujezdce"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Enhver webside som kopilot"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Brug den officielle ChatGPT-hjemmeside eller en anden webside gratis som din AI-kopilot."
},
"toggle_minimize_desc": {
"message": "Skift visning/skjul Copilot-vindue"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Jede Webseite als Copilot"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Verwenden Sie die offizielle ChatGPT-Website oder jede andere Webseite kostenlos als Ihren AI-Copiloten."
},
"toggle_minimize_desc": {
"message": "Copilot-Fenster anzeigen/ausblenden umschalten"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Πολυεργαλείο βοηθός"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Χρησιμοποιήστε τον επίσημο ιστότοπο του ChatGPT ή οποιαδήποτε ιστοσελίδα ως τον AI συνοδηγό σας."
},
"toggle_minimize_desc": {
"message": "Εναλλαγή εμφάνισης/απόκρυψης του παραθύρου του Συνοδηγού"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Any web page as copilot"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Use the official ChatGPT website or any other webpage for free as your AI copilot, including GPTs, GPT-4, or any new features."
},
"toggle_minimize_desc": {
"message": "Toggle show/hide Copilot window"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Any web page as copilot"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Use the official ChatGPT website or any other webpage for free as your AI copilot, including GPTs, GPT-4, or any new features."
},
"toggle_minimize_desc": {
"message": "Toggle show/hide Copilot window"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Any web page as copilot"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Use the official ChatGPT website or any other webpage for free as your AI copilot, including GPTs, GPT-4, or any new features."
},
"toggle_minimize_desc": {
"message": "Toggle show/hide Copilot window"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Asistente multitarea"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Utiliza el sitio web oficial de ChatGPT o cualquier otra página web de forma gratuita como tu copiloto de IA."
},
"toggle_minimize_desc": {
"message": "Alternar mostrar/ocultar ventana de Copiloto"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Asistente de multitarea"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Utiliza el sitio web oficial de ChatGPT o cualquier otra página web de forma gratuita como tu copiloto de IA."
},
"toggle_minimize_desc": {
"message": "Alternar mostrar/ocultar ventana de Copiloto"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Mitmeülesandejuht"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Kasutage ametlikku ChatGPT veebisaiti või mis tahes muud veebilehte oma tehisintellektist kaasjuhina tasuta."
},
"toggle_minimize_desc": {
"message": "Vaheta kaasjuhi akna kuvamist/peitmist"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - کمک کننده چند وظیفه"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "از وب سایت رسمی چت جی پی تی یا هر صفحه وب دیگر به عنوان همراه راننده خود برای رایگان استفاده کنید."
},
"toggle_minimize_desc": {
"message": "تغییر حالت نمایش / عدم نمایش پنجره همراه راننده"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Monitoimintavastaanottaja"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Käytä virallista ChatGPT-verkkosivustoa tai mitä tahansa muuta verkkosivua ilmaiseksi tekoäly-apukuskina."
},
"toggle_minimize_desc": {
"message": "Vaihda Copilot-ikkunan näyttö/piilotus"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Web app, AI copilot"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Gamitin ang opisyal na website ng ChatGPT o anumang ibang webpage nang libre bilang iyong AI copilot."
},
"toggle_minimize_desc": {
"message": "I-on ang pagpapalit ng pagpapakita/pagtatago ng bintana ng Copilot"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Assistant multitâche"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Utilisez le site Web officiel ChatGPT ou toute autre page Web gratuitement en tant que votre copilote IA."
},
"toggle_minimize_desc": {
"message": "Activer/désactiver la fenêtre du copilote"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - વેબ ઍપ, AI કોપાયલોટ"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Use the official ChatGPT website or any webpage as your AI copilot."
},
"toggle_minimize_desc": {
"message": "કોપાયલોટ વિંડો બતાવવા/છુપાવવા ટૉગલ કરો"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - כל דף אינטרנט כמסע נהג"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "השתמש באתר הרשמי של ChatGPT או בכל דף אינטרנט אחר ללא תשלום כמסע נהג שלך, כולל GPTs, GPT-4 או כל תכונות חדשות."
},
"toggle_minimize_desc": {
"message": "שינוי הצגה/הסתרה של חלון הגיבור המלכודת"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - वेब ऐप, AI को-पायलट"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "ChatGPT वेबसाइट या किसी अन्य वेब पृष्ठ का प्रयोग निशुल्क रूप से अपने AI को-पायलट के रूप में करें।"
},
"toggle_minimize_desc": {
"message": "को-पायलट विंडो का दिखाएँ/छुपाएँ टॉगल करें"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Web aplikacija, AI suvozač"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Besplatno koristite službenu ChatGPT web stranicu ili bilo koju drugu web stranicu kao svoj AI suvozač."
},
"toggle_minimize_desc": {
"message": "Uključivanje/isključivanje prikaza suvozačevog prozora"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Többfeladatos segítő"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Használd az hivatalos ChatGPT weboldalt vagy bármely más weboldalt ingyen az AI autóvezetőddé."
},
"toggle_minimize_desc": {
"message": "Váltás az Autóvezető ablak megjelenítése/elrejtése között"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Aplikasi web, kopilot AI"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Gunakan situs web resmi ChatGPT atau halaman web lainnya secara gratis sebagai kopilot AI Anda."
},
"toggle_minimize_desc": {
"message": "Aktifkan/Tutup tampilan jendela Kopilot"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - App web, copilota AI"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Utilizza il sito web ufficiale di ChatGPT o qualsiasi altra pagina web gratuitamente come tuo copilota AI."
},
"toggle_minimize_desc": {
"message": "Attiva/disattiva visualizzazione/nascondi finestra Copilot"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - 無限アプリ、AIアシスタント"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "ChatGPTの公式ウェブサイトや他のページを無料でAIアシスタントにする。GPTやGPT4の新機能を即座に体験できる。オープンソースの大規模モデルや文心一言と対話し、Google翻訳やTikTokで短い動画を見ることもできます。"
},
"toggle_minimize_desc": {
"message": "Copilotウィンドウを切り替える"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - ವೆಬ್ ಆ್ಯಪ್, ಏಐ ಕೊಪಿಲೋಟ್"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "ಆಧಿಕಾರಿಕ ChatGPT ವೆಬ್‌ಸೈಟ್ ಅಥವಾ ಯಾವುದೇ ವೆಬ್‌ಪೇಜ್‌ನೊಂದಿಗೆ ನಿಮ್ಮ ಏಕಾಂತಕ್ಕೆ AI ಸಹಾಯಕ ಹೊಸ್ತಾದ ಹಾಗೆ ಬಳಸಿ."
},
"toggle_minimize_desc": {
"message": "ಕೊಪಿಲೋಟ್ ವಿಂಡೋ ತೋರಿಸು/ಮರೆಮಾಡು ಟಾಗಲ್‌"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - 무한 어플리케이션, AI 어시스턴트"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Use the official ChatGPT website or any webpage as your AI copilot."
},
"toggle_minimize_desc": {
"message": "CoPilot 창 표시/숨기기 전환"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Multitasking assistant"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Naudokite oficialią ChatGPT svetainę ar bet kurią svetainę kaip savo AI bendražygį."
},
"toggle_minimize_desc": {
"message": "Perjungti rodyti/paslėpti kolegos langą"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Daudzfunkciju palīgs"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Bezmaksas izmantojiet oficiālo ChatGPT mājaslapu vai jebkuru citu tīmekļa lapu kā savu AI līdzpilotu."
},
"toggle_minimize_desc": {
"message": "Pārslēgt Kopilota loga rādīšanu/paslēpšanu"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Multitasking assistant"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "സർക്കാർഗെറ്റ് വെബ് സൈറ്റുകൾ അല്ലെങ്കിൽ മറ്റ് ഏതെങ്കിലും വെബ് പേജ് സൌജന്യമായാൽ നിങ്ങളുടെ ഏ.ഐ. കോ-പയ്ലറ്റായാക്കാം."
},
"toggle_minimize_desc": {
"message": "കോ-പയ്ലറ്റ് വിൻഡോ കാണാൻ/മറയ്ക്കാൻ ടോഗിൾ ചെയ്യുക"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - वेब अ‍ैप, AI सहकारीस्वरूपी"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "ChatGPT या अधिकृत वेबसाइट किंवा इतर कोणत्याही वेब पृष्ठावर मुफ्त म्हणून आपल्या AI सहकारीस्वरूपी म्हणून वापरा."
},
"toggle_minimize_desc": {
"message": "सहाय्यक विंडो दाखवण्याचे/लपवण्याचे स्विच करा"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Penolong Pelbagai Tugas"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Gunakan laman web rasmi ChatGPT atau laman web lain secara percuma sebagai pembantu pemandu AI anda."
},
"toggle_minimize_desc": {
"message": "Togol papar/sorok tetingkap Pembantu"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Webapp, AI copiloot"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Gebruik de officiële ChatGPT-website of een andere webpagina gratis als uw AI copiloot, inclusief GPT's, GPT-4 of nieuwe functies."
},
"toggle_minimize_desc": {
"message": "Klap het Copilot-venster in/uit"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Multitasking-assistent"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Bruk den offisielle ChatGPT-nettsiden eller en annen nettside gratis som din AI medpilot."
},
"toggle_minimize_desc": {
"message": "Bytt vis/skjul Medpilot-vinduet"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Multitasking assistant"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Używaj oficjalnej strony internetowej ChatGPT lub dowolnej innej strony za darmo jako swojego współpilota AI."
},
"toggle_minimize_desc": {
"message": "Przełącz pokaż/ukryj okno Współpilota"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Assistente multitarefa"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Use o site oficial do ChatGPT ou qualquer outra página da web gratuitamente como seu co-piloto de IA."
},
"toggle_minimize_desc": {
"message": "Alternar mostrar/ocultar janela de Co-piloto"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Assistente de multitarefas"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Use o site oficial do ChatGPT ou qualquer outra página da web gratuitamente como seu copiloto de IA."
},
"toggle_minimize_desc": {
"message": "Alternar mostrar/ocultar janela do Copiloto"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Aplicație web, copilot AI"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Folosiți site-ul oficial ChatGPT sau orice altă pagină web gratuit ca și copilot AI."
},
"toggle_minimize_desc": {
"message": "Comutați între afișarea/ascunderea ferestrei Copilot"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Мультизадачный помощник"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Используйте официальный веб-сайт ChatGPT или любую другую веб-страницу бесплатно в качестве вашего помощника-со-водителя."
},
"toggle_minimize_desc": {
"message": "Переключить показ/скрытие окна помощника-со-водителя"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Multitasking asistent"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Použite oficiálnu webovú stránku ChatGPT alebo akúkoľvek inú webovú stránku zadarmo ako váš AI spolujazdec."
},
"toggle_minimize_desc": {
"message": "Prepnúť zobrazenie/skrytie okna Spolujazdec"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Večopravilni pomočnik"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Brezplačno uporabite uradno spletno mesto ChatGPT ali katero koli drugo spletno stran kot svoj AI sovoznik."
},
"toggle_minimize_desc": {
"message": "Preklopite prikaz/skrivanje okna Sovoznika"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Web aplikacija, AI kopilot"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Besplatno koristite zvaničnu ChatGPT veb stranicu ili bilo koju drugu veb stranicu kao vaš AI kopilot."
},
"toggle_minimize_desc": {
"message": "Prikaži/sakrij prozor kopilota"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Multifunktionsassistent"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Använd den officiella ChatGPT-webbplatsen eller vilken annan webbsida som helst gratis som din AI-co-pilot."
},
"toggle_minimize_desc": {
"message": "Växla visa/dölj co-pilot-fönstret"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Multitasking assistant"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Tumia tovuti rasmi ya ChatGPT au ukurasa wowote mwingine wa wavuti bure kama mpalaji wako wa AI."
},
"toggle_minimize_desc": {
"message": "Badilisha kuonyesha/ficha dirisha la Mpangilio"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - பலவின்பமுள்ள உதவி"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "உங்கள் அறிவியல் உதவி காப்பாற்ற பதிவாக்க ஆமின் இயந்திரத்தைஅல்லது எங்கேரும் புதிய அம்சங்களை உள்ளதாக்கலாம்."
},
"toggle_minimize_desc": {
"message": "காப்பாற்ற சாளரத்தை முதல்வரிக்கவும்"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - వెబ్ యాప్, AI కోపిలాట్"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "ఉచితంగా మీరు మీ AI కోపిలాట్కు ఆధికారిక చాట్ జీపీటి వెబ్సైట్ లేదా ఏ మరొక వెబ్ పేజీని ఉపయోగించుకోండి."
},
"toggle_minimize_desc": {
"message": "కోపిలాట్ విండో దాచు/దాగువాడండి టాగిల్ చేయండి"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Multitasking assistant"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "ใช้เว็บไซต์ ChatGPT อย่างเป็นทางการหรือหน้าเว็บใดก็ได้ฟรีเป็น Copilot ของ AI ของคุณ เช่น GPTs, GPT-4 หรือคุณสมบัติใหม่ ๆ"
},
"toggle_minimize_desc": {
"message": "สลับแสดง / ซ่อนหน้าต่าง Copilot"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Çoklu Görevli Yardımcı"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Resmi ChatGPT sitesini veya herhangi bir web sayfasını ücretsiz olarak yapay zeka yardımcınız olarak kullanın."
},
"toggle_minimize_desc": {
"message": "Yardımcı pencereyi göster/gizle"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Багатозадачний помічник"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Безкоштовно використовуйте офіційний веб-сайт ChatGPT або будь-яку іншу веб-сторінку як Штучний розум."
},
"toggle_minimize_desc": {
"message": "Перемкнути вікно Співкерманича (показати/приховати)"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - Ứng dụng web, phi công AI"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "Sử dụng trang web chính thức của ChatGPT hoặc bất kỳ trang web nào khác miễn phí như là phi công AI của bạn."
},
"toggle_minimize_desc": {
"message": "Mở/đóng cửa sổ Copilot"
}
}
\ No newline at end of file
{
"name": {
"message": "Anything Copilot - 無限應用、AI助手"
},
"short_name": {
"message": "Anything Copilot"
},
"description": {
"message": "免費將ChatGPT官網或其他頁面化為您的AI助手,立即體驗GPTs、GPT4及其他新功能。可與開源大模型、文心一言對話,用Google Translate翻譯及抖音刷短視頻。"
},
"toggle_minimize_desc": {
"message": "切換顯示/隱藏Copilot視窗"
}
}
\ No newline at end of file
......@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
<title>Anything Copilot</title>
<base href="http://localhost:3000">
</head>
<body>
......
public/favicon.ico

4.19 KB | W: | H:

public/favicon.ico

1.91 KB | W: | H:

public/favicon.ico
public/favicon.ico
public/favicon.ico
public/favicon.ico
  • 2-up
  • Swipe
  • Onion skin
File deleted
......@@ -39,6 +39,9 @@
--color-heading: var(--vt-c-text-light-1);
--color-text: var(--vt-c-text-light-1);
--bg-rgb: 255, 255, 255;
--fg-rgb: 0, 0, 0;
--section-gap: 160px;
}
......@@ -54,6 +57,9 @@
--color-heading: var(--vt-c-text-dark-1);
--color-text: var(--vt-c-text-dark-2);
--bg-rgb: 0, 0, 0;
--fg-rgb: 255, 255, 255;
}
}
......
@import './base.css';
@import "./base.css";
#app {
margin: 0 auto;
......@@ -8,13 +8,14 @@
a,
.green {
text-decoration: none;
color: hsla(160, 100%, 37%, 1);
/* color: hsla(160, 100%, 37%, 1); */
color: #38bdf8;
transition: 0.4s;
}
@media (hover: hover) {
a:hover {
background-color: hsla(160, 100%, 37%, 0.2);
/* background-color: hsla(160, 100%, 37%, 0.2); */
}
}
......
......@@ -81,12 +81,12 @@ type UpdatePipWinOption = {
windowInfo: Partial<chrome.windows.UpdateInfo>;
};
async function updatePipWin({ windowId, windowInfo }: UpdatePipWinOption) {
async function updateWindow({ windowId, windowInfo }: UpdatePipWinOption) {
await chrome.windows.update(windowId, windowInfo);
}
function handleMessage(message: any, sender: chrome.runtime.MessageSender) {
console.log("bg message: ", message, sender);
console.log("bg message: ", message, sender, Date.now());
switch (message?.type) {
case MessageType.bgOpenPip:
openPipBackground(message.url);
......@@ -100,12 +100,11 @@ function handleMessage(message: any, sender: chrome.runtime.MessageSender) {
case MessageType.getPipWinInfo:
getPipWindow(sender.tab?.id!, message.options);
break;
case MessageType.minimizePipWin:
minimizePip(message.options);
console.log(message, sender);
case MessageType.updateWindow:
updateWindow(message.options);
break;
case MessageType.updatePipWin:
updatePipWin(message.options);
case MessageType.removeWindow:
chrome.windows.remove(message.options.windowId);
break;
}
}
......
This diff is collapsed.
<script setup lang="ts">
import { PipEventName } from "@/types/pip";
import { reactive, ref } from "vue";
import IconClose from "./icons/IconClose.vue";
import { dispatchContentEvent } from "@/content/event"
import { reactive, ref } from "vue"
import IconClose from "./icons/IconClose.vue"
import { useI18n } from "@/utils/i18n"
const emit = defineEmits(["close"]);
const { t } = useI18n()
const host = ref(location.host);
const emit = defineEmits(["close"])
const host = ref(location.host)
function handleClick() {
document.dispatchEvent(
new CustomEvent(PipEventName.pip, {
dispatchContentEvent({
type: "pip",
detail: {
url: location.href,
mode: "write-html",
},
})
);
emit("close");
emit("close")
}
function handleClose(e: MouseEvent) {
e.stopPropagation();
emit("close");
e.stopPropagation()
emit("close")
}
</script>
......@@ -58,7 +60,7 @@ function handleClose(e: MouseEvent) {
class="w-36 h-36 rounded-full animate-ping bg-[var(--color-background-soft)]"
></div>
<div class="font-bold text-base">Click Here</div>
<div class="font-bold text-base">{{ t("clickHere") }}</div>
</div>
</div>
</div>
......
<template>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 127.14 96.36"
fill="currentColor"
color="#5865f2"
>
<path
d="M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1A105.25,105.25,0,0,0,126.6,80.22h0C129.24,52.84,122.09,29.11,107.7,8.07ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.25,60,73.25,53s5-12.74,11.44-12.74S96.23,46,96.12,53,91.08,65.69,84.69,65.69Z"
/>
</svg>
</template>
<template>
<svg
width="98"
height="96"
viewBox="0 0 100 100"
xmlns="http://www.w3.org/2000/svg"
fill="currentColor"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z"
/>
</svg>
</template>
<template>
<svg
xmlns="http://www.w3.org/2000/svg"
height="24"
viewBox="0 -960 960 960"
width="24"
fill="currentColor"
>
<path
d="M240-840h440v520L400-40l-50-50q-7-7-11.5-19t-4.5-23v-14l44-174H120q-32 0-56-24t-24-56v-80q0-7 2-15t4-15l120-282q9-20 30-34t44-14Zm360 80H240L120-480v80h360l-54 220 174-174v-406Zm0 406v-406 406Zm80 34v-80h120v-360H680v-80h200v520H680Z"
/>
</svg>
</template>
<template>
<svg
xmlns="http://www.w3.org/2000/svg"
height="24"
viewBox="0 -960 960 960"
width="24"
fill="currentColor"
>
<path
d="M720-120H280v-520l280-280 50 50q7 7 11.5 19t4.5 23v14l-44 174h258q32 0 56 24t24 56v80q0 7-2 15t-4 15L794-168q-9 20-30 34t-44 14Zm-360-80h360l120-280v-80H480l54-220-174 174v406Zm0-406v406-406Zm-80-34v80H160v360h120v80H80v-520h200Z"
/>
</svg>
</template>
<template>
<svg
width="12"
height="12"
viewBox="0 0 1200 1227"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"
/>
</svg>
</template>
<script setup lang="ts">
import { ref, onMounted, onUnmounted, watch } from "vue"
import { pipWindow } from "@/store"
import IconHide from "@/components/icons/IconHide.vue"
import IconArrowCircleRight from "@/components/icons/IconArrowCircleRight.vue"
import IconClose from "@/components/icons/IconClose.vue"
import { MessageType } from "@/types"
const handleLocalChange = (changes: {
[key: string]: chrome.storage.StorageChange
}) => {
if (changes.pipWindowId) {
pipWindow.id = changes.pipWindowId.newValue
}
}
watch(
() => pipWindow.id,
async (id) => {
if (id) {
const tabs = await chrome.tabs.query({ windowId: id })
console.log("pip window tabs: ", tabs, id)
if (tabs && tabs.length == 1) {
pipWindow.tab = tabs[0]
}
return
}
pipWindow.tab = null
}
)
onMounted(() => {
chrome.storage.local
.get({ pipWindowId: null })
.then(({ pipWindowId: id }) => {
if (id) {
pipWindow.id = id
}
})
chrome.storage.local.onChanged.addListener(handleLocalChange)
})
onUnmounted(() => {
chrome.storage.local.onChanged.removeListener(handleLocalChange)
})
async function handleUpdatePip(state: "normal" | "minimized") {
await chrome.runtime.sendMessage({
type: MessageType.updateWindow,
options: {
windowId: pipWindow.id,
windowInfo: {
state,
},
},
})
}
async function closePip() {
await chrome.runtime.sendMessage({
type: MessageType.updateWindow,
options: {
windowId: pipWindow.id,
windowInfo: {
state: "normal",
},
},
})
await chrome.runtime.sendMessage({
type: MessageType.removeWindow,
options: {
windowId: pipWindow.id,
},
})
}
</script>
<template>
<div v-if="pipWindow.tab && pipWindow.tab.id">
<div class="text-sm flex items-center truncate mt-6">
<span
class="w-4 h-4 inline-block mr-2 rounded"
:style="{
background:
'#8882 center / contain url(' + pipWindow.tab?.favIconUrl + ')',
}"
></span>
<span>{{ pipWindow.tab?.title }}</span>
</div>
<div class="flex gap-2">
<button
class="primary-btn flex items-center mt-2 rounded-lg p-2 px-3"
@click="handleUpdatePip('minimized')"
>
<IconHide />
</button>
<button
class="primary-btn flex items-center mt-2 rounded-lg p-2 px-3"
@click="handleUpdatePip('normal')"
>
<IconArrowCircleRight />
</button>
<button
class="primary-btn flex items-center mt-2 rounded-lg p-2 px-3"
@click="closePip"
>
<IconClose />
</button>
</div>
</div>
</template>
<style scoped>
.primary-btn {
background: var(--color-background-soft);
}
.primary-btn:hover {
background: var(--color-background-mute);
}
</style>
<script setup lang="ts">
import { pipLauncher } from "./store";
import { pipLauncher } from "@/store";
import PipLauncher from "@/components/PipLauncher.vue";
import { useI18n } from "vue-i18n";
const { t } = useI18n();
</script>
<template>
......
<script setup lang="ts">
import Multitasking from "@/components/Multitasking.vue";
import PipSplash from "@/components/PipSplash.vue";
import { pipLoading } from "./store";
import LoadingBar from "@/components/LoadingBar.vue";
import Multitasking from "@/components/Multitasking.vue"
import PipSplash from "@/components/PipSplash.vue"
import { pipLoading } from "@/store"
import LoadingBar from "@/components/LoadingBar.vue"
</script>
<template>
......
type EventOptions =
| {
type: "pip"
detail: {
url: string
mode: string
}
}
| {
type: "load-doc"
detail: {
url: string
}
}
| {
type: "loaded"
detail: {}
}
type EventType = EventOptions["type"]
function getRealType(type: string) {
return "anything-copilot_" + type
}
export function dispatchContentEvent({ type, detail }: EventOptions) {
const event = new CustomEvent(getRealType(type), { detail })
document.dispatchEvent(event)
}
export function addContentEventListener(
type: EventType,
handler: (e: Event) => void
) {
document.addEventListener(getRealType(type), handler)
}
export function removeContentEventListener(
type: EventType,
handler: (e: Event) => void
) {
document.removeEventListener(getRealType(type), handler)
}
import { mount, waitMountApp } from "./ui";
import { mount, waitMountApp } from "./ui"
import { contentCss, pipLauncher, pipLoading, pipWindow } from "@/store"
import { MessageType } from "@/types"
import Copilot from "./Copilot.vue"
import { waitMessage } from "@/utils/ext"
import {
contentCss,
pipLauncher,
pipLoading,
pipWindowInfo,
pipWindowRef,
} from "./store";
import { MessageType } from "@/types";
import Copilot from "./Copilot.vue";
import { waitMessage } from "@/utils/ext";
import { PipEventName } from "@/types/pip";
dispatchContentEvent,
addContentEventListener,
removeContentEventListener,
} from "@/content/event"
// import { PipEventName } from "@/types/pip"
function handleMessage(
message: any,
sender: chrome.runtime.MessageSender,
sendResponse: (res: any) => void
) {
console.log(message, sender);
console.log(message, sender)
switch (message?.type) {
case MessageType.pip:
document.dispatchEvent(
new CustomEvent(PipEventName.pip, { detail: message.options })
);
break;
dispatchContentEvent({
type: "pip",
detail: message.options,
})
break
case "content-css":
contentCss.value = message.payload?.value || "";
break;
contentCss.value = message.payload?.value || ""
break
case MessageType.pipLaunch:
pipLauncher.visible = true;
break;
pipLauncher.visible = true
break
case MessageType.hiContent:
chrome.runtime.sendMessage({
type: MessageType.contentHere,
});
sendResponse({ type: MessageType.contentHere });
break;
})
sendResponse({ type: MessageType.contentHere })
break
case MessageType.pipWinInfo:
pipWindowInfo.value = message.window;
pipWindow.windowsWindow = message.window
chrome.storage.local.set({
pipWindowId: message.window.id,
});
break;
})
break
}
}
async function handlePipEvent(event: any) {
const pipWindow = await new Promise<Window | null>((r) => {
const docPip = window.documentPictureInPicture;
const win = await new Promise<Window | null>((r) => {
const docPip = window.documentPictureInPicture
const handleEnter = () => {
r(docPip.window);
docPip?.removeEventListener("enter", handleEnter);
};
docPip?.addEventListener("enter", handleEnter);
});
r(docPip.window)
docPip?.removeEventListener("enter", handleEnter)
}
docPip?.addEventListener("enter", handleEnter)
})
console.log("content pip event: ", event);
console.log("content pip event: ", event)
if (pipWindow) {
pipWindowRef.value = pipWindow;
mount(Copilot, pipWindow.document);
if (win) {
pipWindow.window = win
mount(Copilot, win.document)
await new Promise<void>((r) => {
document.addEventListener(PipEventName.loaded, (e) => {
console.log("load", e);
r();
});
});
const handlePipLoaded = (e: Event) => {
console.log("load", e)
r()
removeContentEventListener("loaded", handlePipLoaded)
}
addContentEventListener("loaded", handlePipLoaded)
})
// may be 0 if not wait document is loaded
chrome.runtime.sendMessage({
type: MessageType.getPipWinInfo,
options: {
width: pipWindow.outerWidth,
height: pipWindow.outerHeight,
width: win.outerWidth,
height: win.outerHeight,
},
});
})
pipWindow.addEventListener("pagehide", () => {
win.addEventListener("pagehide", () => {
chrome.storage.local.set({
pipWindowId: undefined,
});
});
pipWindowId: 0,
})
})
}
}
async function handlePipLoadedEvent(e: Event) {
console.log("e: ", e);
pipLoading.splashScreen = false;
pipLoading.isLoading = false;
const pipWindow = window.documentPictureInPicture.window;
if (pipWindow) {
mount(Copilot, pipWindow.document);
console.log("e: ", e)
pipLoading.splashScreen = false
pipLoading.isLoading = false
const win = window.documentPictureInPicture.window
if (win) {
mount(Copilot, win.document)
}
}
async function handlePopLoadDocEvent(e: CustomEvent | Event) {
pipLoading.isLoading = true;
pipLoading.isLoading = true
}
chrome.runtime.onMessage.addListener(handleMessage);
document.addEventListener(PipEventName.pip, handlePipEvent);
document.addEventListener(PipEventName.loaded, handlePipLoadedEvent);
document.addEventListener(PipEventName.loadDoc, handlePopLoadDocEvent);
waitMountApp();
chrome.runtime?.onMessage.addListener(handleMessage)
addContentEventListener("pip", handlePipEvent)
addContentEventListener("loaded", handlePipLoadedEvent)
addContentEventListener("load-doc", handlePopLoadDocEvent)
waitMountApp()
// dev
if (location.host == chrome.runtime.id && location.hash == "#copilot") {
mount(Copilot, window.document)
}
import { PipEventName } from "@/types/pip";
import { copilotNavigateTo, pip } from "./pip";
import { addContentEventListener } from "./event"
import { copilotNavigateTo, pip } from "./pip"
function handlePipEvent(event: CustomEvent | Event) {
console.log(event);
if ("detail" in event) {
try {
pip(event.detail);
} catch (e) {
console.error(e);
}
pip(event.detail)
}
}
function handleLoadDocEvent(event: CustomEvent | Event) {
if ("detail" in event) {
copilotNavigateTo(event.detail.url);
copilotNavigateTo(event.detail.url)
}
}
document.addEventListener(PipEventName.pip, handlePipEvent);
document.addEventListener(PipEventName.loadDoc, handleLoadDocEvent);
window.addEventListener("securitypolicyviolation", (e) => {
console.warn(e);
console.log(e.originalPolicy);
});
addContentEventListener('pip', handlePipEvent)
addContentEventListener('load-doc', handleLoadDocEvent)
import { PipEventName, type PipOptions } from "@/types/pip";
import { type PipOptions } from "@/types/pip"
import {
querySome,
copyStyleSheets,
getDomNonce,
replaceHtmlNonce,
removePrerenderRules,
} from "@/utils/dom";
} from "@/utils/dom"
import { dispatchContentEvent } from "./event"
function fetchDoc(input: URL | RequestInfo, init?: RequestInit) {
const headers = {
......@@ -13,172 +14,172 @@ function fetchDoc(input: URL | RequestInfo, init?: RequestInit) {
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
// "User-Agent":
// "Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Mobile Safari/537.36",
};
}
return fetch(input, {
...init,
headers: {
...headers,
...init?.headers,
},
});
})
}
let initWindow = null as any;
let initWindow = null as any
export async function pip(options: PipOptions) {
let { mode, selector, url, isCopyStyle } = options;
url = url || location.href;
let element: Element | null = null;
let { mode, selector, url, isCopyStyle } = options
url = url || location.href
let element: Element | null = null
if (selector) {
mode = "move-element";
element = querySome(selector);
mode = "move-element"
element = querySome(selector)
}
const pipWindow = await window.documentPictureInPicture.requestWindow({
width: 420,
height: 800,
});
})
initWindow = { ...pipWindow };
initWindow = { ...pipWindow }
// test(pipWindow.document, pipWindow);
if (isCopyStyle) {
copyStyleSheets(pipWindow, document);
copyStyleSheets(pipWindow, document)
}
if (mode === "iframe") {
const iframe = document.createElement("iframe");
iframe.src = url;
iframe.id = "";
iframe.setAttribute("style", "width: 100%; height: 100%; border: none;");
pipWindow.document.body.append(iframe);
return;
const iframe = document.createElement("iframe")
iframe.src = url
iframe.id = ""
iframe.setAttribute("style", "width: 100%; height: 100%; border: none;")
pipWindow.document.body.append(iframe)
return
}
if (mode === "move-element") {
if (element) {
pipWindow.document.body.append(element);
return;
pipWindow.document.body.append(element)
return
} else {
throw Error("selector not found");
throw Error("selector not found")
}
}
if (mode === "write-html") {
const res = await fetchDoc(url);
const html = await res.text();
writeHtml(pipWindow, html);
navGuard(pipWindow);
return;
const res = await fetchDoc(url)
const html = await res.text()
writeHtml(pipWindow, html)
navGuard(pipWindow)
return
}
}
export async function copilotNavigateTo(url: string) {
const pipWindow = window.documentPictureInPicture.window;
const pipWindow = window.documentPictureInPicture.window
if (!pipWindow) {
throw Error("pipWindow not found");
throw Error("pipWindow not found")
}
const res = await fetchDoc(url);
const html = await res.text();
const res = await fetchDoc(url)
const html = await res.text()
// resetWindow(pipWindow);
writeHtml(pipWindow, html);
pipWindow.history.replaceState(pipWindow.history.state, "", url);
writeHtml(pipWindow, html)
pipWindow.history.replaceState(pipWindow.history.state, "", url)
}
type ReopenOptions = {
url: string;
width?: number;
height?: number;
};
url: string
width?: number
height?: number
}
/** Error: requires user activation */
export async function copilotReopen({ url, width, height }: ReopenOptions) {
const p = window.documentPictureInPicture.window;
let w = width;
let h = height;
const p = window.documentPictureInPicture.window
let w = width
let h = height
if (p) {
w = w || p.innerWidth;
h = h || p.innerHeight;
p.close();
w = w || p.innerWidth
h = h || p.innerHeight
p.close()
}
const pipWindow = await window.documentPictureInPicture.requestWindow({
width: w,
height: h,
});
const res = await fetchDoc(url);
const html = await res.text();
writeHtml(pipWindow, html);
navGuard(pipWindow);
})
const res = await fetchDoc(url)
const html = await res.text()
writeHtml(pipWindow, html)
navGuard(pipWindow)
}
function writeHtml(pipWindow: Window, html: string) {
const nonce = getDomNonce(document);
let escaped = replaceHtmlNonce(html, nonce);
const nonce = getDomNonce(document)
let escaped = replaceHtmlNonce(html, nonce)
if (window.trustedTypes) {
const escapeHTMLPolicy = window.trustedTypes.createPolicy("escapePolicy", {
createHTML: (string: string) => string,
});
escaped = escapeHTMLPolicy.createHTML(escaped);
})
escaped = escapeHTMLPolicy.createHTML(escaped)
}
pipWindow.document.open();
pipWindow.document.write(escaped);
pipWindow.document.close();
document.dispatchEvent(new CustomEvent(PipEventName.loaded));
pipWindow.document.open()
pipWindow.document.write(escaped)
pipWindow.document.close()
dispatchContentEvent({ type: "loaded", detail: {} })
const base = document.createElement("base");
base.target = "_blank";
pipWindow.document.head.append(base);
const base = document.createElement("base")
base.target = "_blank"
pipWindow.document.head.append(base)
removePrerenderRules(pipWindow.document);
removePrerenderRules(pipWindow.document)
}
function navGuard(pipWindow: Window) {
const handleBeforeUnload = (e: BeforeUnloadEvent) => {
console.log("before unload: ", e);
e.preventDefault();
e.returnValue = true;
};
console.log("before unload: ", e)
e.preventDefault()
e.returnValue = true
}
const handleClick = (e: MouseEvent) => {
const target = e.target as Element | null;
if (!target) return;
console.log("click ", e);
const target = e.target as Element | null
if (!target) return
console.log("click ", e)
const anchor = target.closest<HTMLAnchorElement>("a, [href]");
if (!anchor) return;
const anchor = target.closest<HTMLAnchorElement>("a, [href]")
if (!anchor) return
const href = anchor.getAttribute("href");
if (!href) return;
const href = anchor.getAttribute("href")
if (!href) return
if (href.slice(0, 1) == "#") {
e.preventDefault();
pipWindow.location.hash = href;
e.preventDefault()
pipWindow.location.hash = href
return;
return
}
console.log(">> href: ", href, e.defaultPrevented);
console.log(">> href: ", href, e.defaultPrevented)
if (
href.startsWith(location.origin) ||
!href.startsWith(location.protocol)
) {
if (!e.defaultPrevented) {
e.preventDefault();
e.preventDefault()
// copilotReopen({ url: new URL(anchor.href, location.origin).href });
copilotNavigateTo(new URL(anchor.href, location.origin).href);
copilotNavigateTo(new URL(anchor.href, location.origin).href)
}
return;
return
}
}
};
pipWindow.addEventListener("beforeunload", handleBeforeUnload);
pipWindow.addEventListener("click", handleClick);
pipWindow.addEventListener("beforeunload", handleBeforeUnload)
pipWindow.addEventListener("click", handleClick)
}
function resetWindow(win: Window) {
......@@ -195,38 +196,38 @@ function resetWindow(win: Window) {
// }
Object.keys(win).forEach((k) => {
if (k == "location") return;
if (k == "location") return
try {
win[k as any] = initWindow[k];
win[k as any] = initWindow[k]
} catch (e) {
console.error(e);
console.error(e)
}
});
})
Object.keys(win.document).forEach((k) => {
if (k == "location") return;
if (k == "location") return
try {
win.document[k as "body"] = initWindow.document[k];
win.document[k as "body"] = initWindow.document[k]
} catch (e) {
console.error(e);
console.error(e)
}
});
})
}
function test(doc: Document, win: Window) {
doc.addEventListener("DOMContentLoaded", (e) => {
console.warn("DOMContentLoaded", e);
});
console.warn("DOMContentLoaded", e)
})
win.addEventListener("beforeunload", (e) => {
console.warn("beforeunload", e);
});
console.warn("beforeunload", e)
})
win.addEventListener("load", (e) => {
console.warn("load", e);
});
console.warn("load", e)
})
win.addEventListener("unload", (e) => {
console.warn("unload", e);
});
console.warn("unload", e)
})
}
import { createApp, type Component } from "vue";
import { createI18n } from "vue-i18n";
import App from "./App.vue";
import { MessageType } from "@/types";
import "@/assets/main.css";
import { createApp, type Component } from "vue"
import App from "./App.vue"
import { MessageType } from "@/types"
import { i18n } from "@/utils/i18n"
import "@/assets/main.css"
const isSelf = chrome.runtime.id === location.host;
const isSelf = chrome.runtime?.id === location.host
export function mount(App: Component, doc = document) {
const outter = doc.createElement("anything-copilot");
const root = isSelf ? outter : outter.attachShadow({ mode: "open" });
const appContainer = doc.createElement("div");
appContainer.id = "app";
const outter = doc.createElement("anything-copilot")
const root = isSelf ? outter : outter.attachShadow({ mode: "open" })
const appContainer = doc.createElement("div")
appContainer.id = "app"
const link = doc.createElement("link");
link.rel = "stylesheet";
link.href = chrome.runtime.getURL("/index.css");
root.append(link);
root.append(appContainer);
doc.documentElement.append(outter);
const link = doc.createElement("link")
link.rel = "stylesheet"
link.href = chrome.runtime?.getURL("/index.css")
root.append(link)
root.append(appContainer)
doc.documentElement.append(outter)
const app = createApp(App);
const i18n = createI18n({});
app.use(i18n);
app.mount(appContainer);
const app = createApp(App)
app.use(i18n)
app.mount(appContainer)
}
export function mountApp(doc = document) {
mount(App, doc);
chrome.runtime.sendMessage({ type: MessageType.contentMount });
mount(App, doc)
chrome.runtime?.sendMessage({ type: MessageType.contentMount })
}
export function waitMountApp() {
if (document.readyState == "interactive") {
mountApp();
mountApp()
} else {
const hanldeStateChange = () => {
if (document.readyState == "interactive") {
document.removeEventListener("readystatechange", hanldeStateChange);
mountApp();
document.removeEventListener("readystatechange", hanldeStateChange)
mountApp()
}
};
document.addEventListener("readystatechange", hanldeStateChange);
}
document.addEventListener("readystatechange", hanldeStateChange)
}
}
{
"openInPip": "በCopilot የምጥ ገጽ ክፍል ክፈት",
"other": "ሌሎች",
"clickHere": "እዚህ ጠቅ ያድርጉ",
"minimize": "ምንጭ",
"moveAside": "ቀስት ለማግኘት",
"close": "ዝጋ",
"refresh": "አስተካክል",
"protectedTabTips": "ይህ ገጽ በመሳሪያ መሳሪያ የተጠበቀ ነው"
}
\ No newline at end of file
{
"openInPip": "افتح في نافذة كوبيلوت",
"other": "آخر",
"clickHere": "انقر هنا",
"minimize": "تصغير",
"moveAside": "تحريك جانباً",
"close": "إغلاق",
"refresh": "تحديث",
"protectedTabTips": "هذه الصفحة محمية بواسطة المتصفح"
}
\ No newline at end of file
{
"openInPip": "Отвори в Copilot прозорец",
"other": "Друго",
"clickHere": "Цъкни тук",
"minimize": "Минимизиране",
"moveAside": "Премести настрана",
"close": "Затвори",
"refresh": "Обнови",
"protectedTabTips": "Тази страница е защитена от браузъра"
}
\ No newline at end of file
{
"openInPip": "Copilot উইন্ডোতে খুলুন",
"other": "অন্যান্য",
"clickHere": "এখানে ক্লিক করুন",
"minimize": "সর্বনিম্ন",
"moveAside": "পাশে সরান",
"close": "বন্ধ করুন",
"refresh": "পুনরায় লোড করুন",
"protectedTabTips": "এই পৃষ্ঠাটি ব্রাউজার দ্বারা সুরক্ষিত"
}
\ No newline at end of file
{
"openInPip": "Obri en finestra del Copilot",
"other": "Altres",
"clickHere": "Clica aquí",
"minimize": "Minimitza",
"moveAside": "Aparta",
"close": "Tanca",
"refresh": "Refresca",
"protectedTabTips": "Aquesta pàgina està protegida pel navegador"
}
\ No newline at end of file
{
"openInPip": "Otevřít v okně Copilot",
"other": "Další",
"clickHere": "Klikněte zde",
"minimize": "Minimalizovat",
"moveAside": "Přesunout stranou",
"close": "Zavřít",
"refresh": "Obnovit",
"protectedTabTips": "Tato stránka je chráněna prohlížečem"
}
\ No newline at end of file
{
"openInPip": "Åbn i Copilot-vindue",
"other": "Andet",
"clickHere": "Klik her",
"minimize": "Minimer",
"moveAside": "Flyt til side",
"close": "Luk",
"refresh": "Opdater",
"protectedTabTips": "Denne side er beskyttet af browseren"
}
\ No newline at end of file
{
"openInPip": "In Copilot-Fenster öffnen",
"other": "Andere",
"clickHere": "Hier klicken",
"minimize": "Minimieren",
"moveAside": "Beiseite bewegen",
"close": "Schließen",
"refresh": "Aktualisieren",
"protectedTabTips": "Diese Seite ist durch den Browser geschützt"
}
\ No newline at end of file
{
"openInPip": "Ανοίξτε στο παράθυρο του Copilot",
"other": "Άλλο",
"clickHere": "Κάντε κλικ εδώ",
"minimize": "Ελαχιστοποίηση",
"moveAside": "Μετακίνηση στην πλευρά",
"close": "Κλείσιμο",
"refresh": "Ανανέωση",
"protectedTabTips": "Αυτή η σελίδα προστατεύεται από τον περιηγητή"
}
\ No newline at end of file
{
"openInPip": "Open in Copilot window",
"other": "Other",
"clickHere": "Click Here",
"minimize": "Minimize",
"moveAside": "Move aside",
"close": "Close",
"refresh": "Refresh",
"protectedTabTips": "This page is protected by browser"
}
\ No newline at end of file
{
"openInPip": "Abrir en ventana de Copilot",
"other": "Otro",
"clickHere": "Haz clic aquí",
"minimize": "Minimizar",
"moveAside": "Mover a un lado",
"close": "Cerrar",
"refresh": "Actualizar",
"protectedTabTips": "Esta página está protegida por el navegador"
}
\ No newline at end of file
{
"openInPip": "Abrir en ventana de Copilot",
"other": "Otro",
"clickHere": "Haz clic aquí",
"minimize": "Minimizar",
"moveAside": "Mover a un lado",
"close": "Cerrar",
"refresh": "Refrescar",
"protectedTabTips": "Esta página está protegida por el navegador"
}
\ No newline at end of file
{
"openInPip": "Avage Copiloti aken",
"other": "Muu",
"clickHere": "Klõpsake siin",
"minimize": "Vähenda",
"moveAside": "Liiguta kõrvale",
"close": "Sulge",
"refresh": "Värskenda",
"protectedTabTips": "See lehekülg on kaitstud brauseri poolt"
}
\ No newline at end of file
{
"openInPip": "باز کردن در پنجره Copilot",
"other": "سایر",
"clickHere": "اینجا کلیک کنید",
"minimize": "کمینه کردن",
"moveAside": "جابجا شدن",
"close": "بستن",
"refresh": "تازه‌سازی",
"protectedTabTips": "این صفحه توسط مرورگر محافظت می‌شود"
}
\ No newline at end of file
{
"openInPip": "Avaa Copilot-ikkunassa",
"other": "Muu",
"clickHere": "Klikkaa tästä",
"minimize": "Pienennä",
"moveAside": "Siirrä sivuun",
"close": "Sulje",
"refresh": "Päivitä",
"protectedTabTips": "Tämä sivu on suojattu selaimen toimesta"
}
\ No newline at end of file
{
"openInPip": "Buksan sa bintana ng Copilot",
"other": "Iba pa",
"clickHere": "I-click Dito",
"minimize": "Ibawas",
"moveAside": "Ilipat sa tabi",
"close": "Isara",
"refresh": "I-refresh",
"protectedTabTips": "Protektado ng browser ang pahinang ito"
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment