NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

Özür dilerim, manifest.json dosyasını eksik bırakmışım. İşte eksiksiz bir Telegram Not Chrome eklentisi:

1. Yeni bir klasör oluşturun ve klasöre "telegram-not-eklentisi" gibi bir isim verin.

2. Oluşturduğunuz klasörde, "manifest.json" adlı bir dosya oluşturun ve aşağıdaki içeriği yapıştırın:

json
{
"manifest_version": 2,
"name": "Telegram Not Eklentisi",
"version": "1.0",
"description": "Telegram grubunda belirtilen miktarda mesajı kopyalayıp not olarak kaydeden bir Chrome eklentisi.",
"icons": {
"16": "icon.png",
"48": "icon.png",
"128": "icon.png"
},
"permissions": ["contextMenus", "tabs", "storage"],
"background": {
"scripts": ["background.js"]
},
"content_scripts": [
{
"matches": ["https://web.telegram.org/*"],
"js": ["content.js"]
}
],
"browser_action": {
"default_popup": "popup.html"
}
}
3. Oluşturduğunuz klasörde, "background.js" adlı bir dosya oluşturun ve aşağıdaki içeriği yapıştırın:

javascript
chrome.runtime.onInstalled.addListener(function() {
chrome.contextMenus.create({
id: "copyMessages",
title: "Mesajları Kopyala",
contexts: ["all"],
});
});

chrome.contextMenus.onClicked.addListener(function(info, tab) {
if (info.menuItemId === "copyMessages") {
chrome.tabs.sendMessage(tab.id, { action: "copyMessages" });
}
});
4. Oluşturduğunuz klasörde, "content.js" adlı bir dosya oluşturun ve aşağıdaki içeriği yapıştırın:

javascript
chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) {
if (request.action === "copyMessages") {
var messageCount = 10; // Kopyalanacak mesaj sayısı
var messages = [];
var messageElements = document.querySelectorAll(".im_message_text"); // Telegram mesajları için uygun sınıfı burada değiştirebilirsiniz
for (var i = 0; i < messageCount && i < messageElements.length; i++) {
messages.push(messageElements[i].innerText);
}
chrome.storage.local.set({ "copiedMessages": messages }, function() {
console.log("Mesajlar kopyalandı.");
});
}
});
5. Oluşturduğunuz klasörde, "popup.html" adlı bir dosya oluşturun ve aşağıdaki içeriği yapıştırın:

html
<!DOCTYPE html>
<html>
<head>
<title>Telegram Not Eklentisi</title>
<style>
body {
width: 300px;
height: 200px;
display: flex;
justify-content: center;
align-items: center;
font-family: Arial, sans-serif;
}
h1 {
font-size: 18px;
margin-bottom: 10px;
}
button {
padding: 10px 20px;
background-color: #4CAF50;
color: white;
border: none;
cursor: pointer;
}
</style>
</head>
<body>
<h1>Mesajları Kopyala</h1>
<button id="copyButton">Kopyala</button>

<script src="popup.js"></script>
</body>
</html>
6. Oluşturduğunuz klasörde, "popup.js" adlı bir dosya oluşturun ve aşağıdaki içeriği yapıştırın:

javascript
document.getElementById("copyButton").addEventListener("click", function() {
chrome.tabs.query({ active: true, currentWindow: true }, function(tabs) {
chrome.tabs.sendMessage(tabs[0].id, { action: "copyMessages" });
});
});
7. Oluşturduğunuz klasörde, "icon.png" adlı bir ikon dosyası ekleyin. Bu, eklentinizin simgesi olacak bir resim dosyası olabilir.

8. Chrome tarayıcınızda, sağ üst köşedeki üç noktaya tıklayın ve "Uzantılar" seçeneğini seçin.

9. "Geliştirici modunu aç" seçeneğ
Main Avatar
7/30/2023, 2:22:34 PM
devam
Main Avatar
7/30/2023, 2:22:43 PM
Tabii, devam edelim:

9. "Geliştirici modunu aç" seçeneğini etkinleştirin.

10. "Paketlenmemiş öğe yükle" düğmesine tıklayın ve "telegram-not-eklentisi" klasörünü seçin.

11. Eklenti yüklendikten sonra, Telegram web sitesine gidin ve bir grup sohbetine giriş yapın.

12. Tarayıcınızın sağ üst köşesinde yeni bir eklenti simgesi göreceksiniz. Bu simgeye tıklayarak, popup.html dosyasında belirtilen "Mesajları Kopyala" butonuna erişebilirsiniz.

13. "Mesajları Kopyala" butonuna tıkladığınızda, belirttiğiniz miktarda mesaj kopyalanacak ve Chrome yerel depolama alanına kaydedilecektir.

Bu adımları takip ederek, Telegram grubunda belirtilen miktarda mesajı kopyalayıp not olarak kaydeden eksiksiz bir Chrome eklentisi oluşturabilirsiniz. Umarım yardımcı olabilmişimdir!
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.