From a065e04d529da1d847b5062a12c46d916408bf32 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 21:46:22 -0500 Subject: update based on https://github.com/mdn/yari/issues/2028 --- .../add-ons/code_snippets/toolbar/index.html | 59 ---------------------- 1 file changed, 59 deletions(-) delete mode 100644 files/bn/mozilla/add-ons/code_snippets/toolbar/index.html (limited to 'files/bn/mozilla/add-ons/code_snippets/toolbar/index.html') diff --git a/files/bn/mozilla/add-ons/code_snippets/toolbar/index.html b/files/bn/mozilla/add-ons/code_snippets/toolbar/index.html deleted file mode 100644 index ce7679b8ca..0000000000 --- a/files/bn/mozilla/add-ons/code_snippets/toolbar/index.html +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: টুলবার -slug: Mozilla/Add-ons/Code_snippets/Toolbar -tags: - - NeedsReview -translation_of: Archive/Add-ons/Code_snippets/Toolbar ---- -

টুলবার বাটন সংযোজন

-

এখানে দুইটি টিউটোরিয়াল রয়েছে :

-

একটি টিউটোরিয়াল এর জন্য একটি বিশেষ পদক্ষেপ রয়েছে: কাষ্টম টুলবার বাটন একটি টিউটোরিয়াল বর্ণনা করার জন্য ইতোমধ্যে আপনার উন্নয়ন বুনিয়াদি একটি টুলবার বাটন যুক্ত করা প্রয়োজন: টুলবার বাটন তৈরি করা

-

বাটন যুক্ত করার পদ্ধতি :

-

আপনি যখন আপনার এক্সটেনশন স্থাপন এবং একটি টুলবার বাটন অভেরলেইং দ্বারা যুক্ত করা হয়, এটি ডিফল্ট অবস্থায় পাওয়া যায় না । ব্যবহারকারীকে বাটনটি টুলবারে টেনে আনতে হয়। নিম্নলিখিত কোড টুলবারে আপনার বাটন স্থাপন করবে। This should only be done on the first run of your add-on after installation so that if the user decides to remove your button, it doesn't show up again every time they start the application.

-

নোট

- -
/**
- * Installs the toolbar button with the given ID into the given
- * toolbar, if it is not already present in the document.
- *
- * @param {string} toolbarId The ID of the toolbar to install to.
- * @param {string} id The ID of the button to install.
- * @param {string} afterId The ID of the element to insert after. @optional
- */
-function installButton(toolbarId, id, afterId) {
-    if (!document.getElementById(id)) {
-        var toolbar = document.getElementById(toolbarId);
-
-        // If no afterId is given, then append the item to the toolbar
-        var before = null;
-        if (afterId) {
-            let elem = document.getElementById(afterId);
-            if (elem && elem.parentNode == toolbar)
-                before = elem.nextElementSibling;
-        }
-
-        toolbar.insertItem(id, before);
-        toolbar.setAttribute("currentset", toolbar.currentSet);
-        document.persist(toolbar.id, "currentset");
-
-        if (toolbarId == "addon-bar")
-            toolbar.collapsed = false;
-    }
-}
-
-if (firstRun) {
-    installButton("nav-bar", "my-extension-navbar-button");
-    // The "addon-bar" is available since Firefox 4
-    installButton("addon-bar", "my-extension-addon-bar-button");
-}
-
-

আরো দেখুন

- -- cgit v1.2.3-54-g00ecf