aboutsummaryrefslogtreecommitdiff
path: root/files/bn/mozilla/add-ons/code_snippets
diff options
context:
space:
mode:
Diffstat (limited to 'files/bn/mozilla/add-ons/code_snippets')
-rw-r--r--files/bn/mozilla/add-ons/code_snippets/index.html194
-rw-r--r--files/bn/mozilla/add-ons/code_snippets/toolbar/index.html59
2 files changed, 253 insertions, 0 deletions
diff --git a/files/bn/mozilla/add-ons/code_snippets/index.html b/files/bn/mozilla/add-ons/code_snippets/index.html
new file mode 100644
index 0000000000..f104d2257b
--- /dev/null
+++ b/files/bn/mozilla/add-ons/code_snippets/index.html
@@ -0,0 +1,194 @@
+---
+title: Code snippets
+slug: Mozilla/Add-ons/Code_snippets
+tags:
+ - Add-ons
+ - Code snippets
+ - Extensions
+ - NeedsTranslation
+ - TopicStub
+translation_of: Archive/Add-ons/Code_snippets
+---
+<p>এটা বিভিন্ন মোজিলা অ্যাপলিকেশনের এক্সটেনশন ডেভেলপারদের জন্য দরকারি কিছু কোড স্নিপেট<span style="font-size: 14px; line-height: 1.5;"> (ছোট ছোট কোডের নমুনা) </span><span style="font-size: 14px; line-height: 1.5;">এর তালিকা। এরমদ্ধে অনেক গুলো নমুনা স্বয়ং মোজিলার কোডে তো ব্যবহার হয়-ই আবার XULRunner অ্যাপ্লিকেশনের মধ্যেও ব্যবহার করা যায়।</span></p>
+<p>কিভাবে প্রাথমিক কাজগুলো করতে হয়, এই নমুনাগুলো সেটা বর্ণনা করে।</p>
+<h2 id="General" name="General">সাধারন বিষয়বস্তু</h2>
+<dl>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/From_articles" title="/en-US/docs/Code_snippets/From_articles">Examples and demos from MDN articles</a></dt>
+ <dd>
+ A collection of examples and demos from articles.</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Windows" title="/en-US/docs/Code_snippets/Windows">Windows code</a></dt>
+ <dd>
+ Opening and manipulating windows</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Toolbar" title="/en-US/docs/Code_snippets/Toolbar">Toolbar</a></dt>
+ <dd>
+ Toolbar related code</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Sidebar" title="/en-US/docs/Code_snippets/Sidebar">Sidebar</a></dt>
+ <dd>
+ Sidebar related code</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Forms">Forms</a></dt>
+ <dd>
+ Forms related code</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/XML" title="/en-US/docs/Code_snippets/XML">XML</a></dt>
+ <dd>
+ Code used to parse, write, manipulate, etc. XML</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/File_I_O" title="/en-US/docs/Code_snippets/File_I/O">File I/O</a></dt>
+ <dd>
+ Code used to read, write and process files</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Drag_&amp;_Drop" title="/en-US/docs/Code_snippets/Drag_&amp;_Drop">Drag &amp; Drop</a></dt>
+ <dd>
+ Code used to setup and handle drag and drop events</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Dialogs_and_Prompts" title="/en-US/docs/Code_snippets/Dialogs_and_Prompts">Dialogs</a></dt>
+ <dd>
+ Code used to display and process dialog boxes</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Alerts_and_Notifications" title="/en-US/docs/Code snippets/Alerts and Notifications">Alerts and Notifications </a></dt>
+ <dd>
+ Modal and non-modal ways to notify users</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Preferences" title="/en-US/docs/Code_snippets/Preferences">Preferences</a></dt>
+ <dd>
+ Code used to read, write, and modify preferences</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/JS_XPCOM" title="/en-US/docs/Code_snippets/JS_XPCOM">JS XPCOM</a></dt>
+ <dd>
+ Code used to define and call XPCOM components in JavaScript</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Running_applications" title="/en-US/docs/Code_snippets/Running_applications">Running applications</a></dt>
+ <dd>
+ Code used to run other applications</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Canvas" title="/en-US/docs/Code_snippets/Canvas"><code>&lt;canvas&gt;</code> related</a></dt>
+ <dd>
+ <a href="/en-US/docs/HTML/Canvas" title="/en-US/docs/HTML/Canvas">WHAT WG Canvas</a>-related code</dd>
+ <dt>
+ <a href="/en-US/docs/Signing_a_XPI" title="/en-US/docs/Signing_a_XPI">Signing a XPI</a></dt>
+ <dd>
+ How to sign an XPI with PKI</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Threads" title="/en-US/docs/Code_snippets/Threads">Threads</a></dt>
+ <dd>
+ Performing background operations and delaying execution while background operations complete</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Miscellaneous" title="/en-US/docs/Code_snippets/Miscellaneous">Miscellaneous</a></dt>
+ <dd>
+ Miscellaneous useful code fragments</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/HTML_to_DOM" title="/en-US/docs/Code_snippets/HTML_to_DOM">HTML to DOM</a></dt>
+ <dd>
+ Using a hidden browser element to parse HTML to a window's DOM</dd>
+</dl>
+<h2 id="Browser-oriented_code" name="Browser-oriented_code">জাভাস্ক্রিপ্ট লাইব্রেরি সমূহ</h2>
+<p>Here are some JavaScript libraries that may come in handy.</p>
+<dl>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/StringView" title="/en-US/docs/Code_snippets/StringView">StringView</a></dt>
+ <dd>
+ A library that implements a <code>StringView</code> view for <a href="/en-US/docs/Web/JavaScript/Typed_arrays" title="/en-US/docs/Web/JavaScript/Typed_arrays">JavaScript typed arrays</a>. This lets you access data in typed arrays using C-like string functions.</dd>
+</dl>
+<h2 id="Browser-oriented_code" name="Browser-oriented_code">ব্রাউজার-ওরিয়েন্টেড কোড</h2>
+<dl>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Tabbed_browser" title="/en-US/docs/Code_snippets/Tabbed_browser">Tabbed browser code</a> (Firefox/SeaMonkey)</dt>
+ <dd>
+ Basic operations, such as page loading, with the tabbed browser, which is the heart of Mozilla's browser applications</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Cookies" title="/en-US/docs/Code_snippets/Cookies">Cookies</a></dt>
+ <dd>
+ Reading, writing, modifying, and removing cookies</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Page_Loading" title="/en-US/docs/Code_snippets/Page_Loading">Page Loading</a></dt>
+ <dd>
+ Code used to load pages, reload pages, and listen for page loads</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Interaction_between_privileged_and_non-privileged_pages" title="/en-US/docs/Code_snippets/Interaction_between_privileged_and_non-privileged_pages">Interaction between privileged and non-privileged code</a></dt>
+ <dd>
+ How to communicate from extensions to websites and vice-versa.</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Downloading_Files" title="/en-US/docs/Code_snippets/Downloading_Files">Downloading Files</a></dt>
+ <dd>
+ Code to download files, images, and to monitor download progress</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Password_Manager" title="/en-US/docs/Code_snippets/Password_Manager">Password Manager</a></dt>
+ <dd>
+ Code used to read and write passwords to/from the integrated password manager</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Bookmarks" title="/en-US/docs/Code_snippets/Bookmarks">Bookmarks</a></dt>
+ <dd>
+ Code used to read and write bookmarks</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/JavaScript_Debugger_Service" title="/en-US/docs/Code_snippets/JavaScript_Debugger_Service">JavaScript Debugger Service</a></dt>
+ <dd>
+ Code used to interact with the JavaScript Debugger Service</dd>
+</dl>
+<h2 id="SVG" name="SVG">এসভিজি</h2>
+<dl>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/SVG_General" title="/en-US/docs/Code_snippets/SVG_General">General</a></dt>
+ <dd>
+ General information and utilities</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/SVG_Animation" title="/en-US/docs/Code_snippets/SVG_Animation">SVG Animation</a></dt>
+ <dd>
+ Animate SVG using JavaScript and SMIL</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/SVG_Interacting_with_script" title="/en-US/docs/Code_snippets/SVG_Interacting_with_script">SVG Interacting with Script</a></dt>
+ <dd>
+ Using JavaScript and DOM events to create interactive SVG</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Embedding_SVG" title="/en-US/docs/Code_snippets/Embedding_SVG">Embedding SVG in HTML and XUL</a></dt>
+ <dd>
+ Using SVG to enhance HTML or XUL based markup</dd>
+</dl>
+<h2 id="XUL_Widgets" name="XUL_Widgets">XUL উইজেট সমূহ</h2>
+<dl>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/HTML_in_XUL_for_rich_tooltips" title="/en-US/docs/Code_snippets/HTML_in_XUL_for_rich_tooltips">HTML in XUL for Rich Tooltips</a></dt>
+ <dd>
+ Dynamically embed HTML into a XUL element to attain markup in a tooltip</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Label_and_description" title="/en-US/docs/Code_snippets/Label_and_description">Label and description</a></dt>
+ <dd>
+ Special uses and line breaking examples</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Tree" title="/en-US/docs/Code_snippets/Tree">Tree</a></dt>
+ <dd>
+ Setup and manipulation of trees using XUL and JS</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Scrollbar" title="/en-US/docs/Code_snippets/Scrollbar">Scrollbar</a></dt>
+ <dd>
+ Changing style of scrollbars. Applies to scrollbars in browser and iframe as well.</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Autocomplete" title="/en-US/docs/Code_snippets/Autocomplete">Autocomplete</a></dt>
+ <dd>
+ Code used to enable form autocomplete in a browser</dd>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Boxes" title="/en-US/docs/Code_snippets/Boxes">Boxes</a></dt>
+ <dd>
+ Tips and tricks when using boxes as containers</dd>
+ <dt>
+ <a class="internal" href="/en-US/docs/Code_snippets/Tabbox" title="/en-US/docs/Code snippets/Tabbox">Tabbox</a></dt>
+ <dd>
+ Removing and manipulating tabs in a tabbox</dd>
+</dl>
+<h2 id="Windows-specific" name="Windows-specific">উইন্ডোজ নির্দিষ্ট</h2>
+<dl>
+ <dt>
+ <a href="/en-US/docs/Code_snippets/Finding_Window_Handles" title="/en-US/docs/Code_snippets/Finding_Window_Handles">Finding Window Handles (HWND)</a> (Firefox)</dt>
+ <dd>
+ How to use Windows API calls to find various kinds of Mozilla window handles. Window handles can be used for IPC and Accessibility purposes.</dd>
+ <dt>
+ <a href="/en-US/docs/Accessing_the_Windows_Registry_Using_XPCOM" title="/en-US/docs/Accessing_the_Windows_Registry_Using_XPCOM">Using the Windows Registry with XPCOM</a></dt>
+ <dd>
+ How to read, write, modify, delete, enumerate, and watch registry keys and values.</dd>
+</dl>
+<h2 id="External_links" name="External_links">বহিঃস্থ লিঙ্ক সমূহ</h2>
+<p>The content at <a class="external" href="http://kb.mozillazine.org/Category:Example_code">MozillaZine Example Code</a> is slowly being moved here, but you can still find useful examples there for now.</p>
diff --git a/files/bn/mozilla/add-ons/code_snippets/toolbar/index.html b/files/bn/mozilla/add-ons/code_snippets/toolbar/index.html
new file mode 100644
index 0000000000..ce7679b8ca
--- /dev/null
+++ b/files/bn/mozilla/add-ons/code_snippets/toolbar/index.html
@@ -0,0 +1,59 @@
+---
+title: টুলবার
+slug: Mozilla/Add-ons/Code_snippets/Toolbar
+tags:
+ - NeedsReview
+translation_of: Archive/Add-ons/Code_snippets/Toolbar
+---
+<h2 id="টুলবার_বাটন_সংযোজন">টুলবার বাটন সংযোজন</h2>
+<p>এখানে দুইটি টিউটোরিয়াল রয়েছে :</p>
+<p>একটি টিউটোরিয়াল এর জন্য একটি বিশেষ পদক্ষেপ রয়েছে: <a href="/en/XUL/Toolbars/Custom_toolbar_button" title="en/Custom_Toolbar_Button">কাষ্টম টুলবার বাটন</a> একটি টিউটোরিয়াল বর্ণনা করার জন্য ইতোমধ্যে আপনার উন্নয়ন বুনিয়াদি একটি টুলবার বাটন যুক্ত করা প্রয়োজন: <a href="/en/XUL/Toolbars/Creating_toolbar_buttons" title="en/Creating_toolbar_buttons">টুলবার বাটন তৈরি করা</a></p>
+<h2 id="বাটন_যুক্ত_করার_পদ্ধতি">বাটন যুক্ত করার পদ্ধতি :</h2>
+<p>আপনি যখন আপনার এক্সটেনশন স্থাপন এবং একটি টুলবার বাটন অভেরলেইং দ্বারা যুক্ত করা হয়, এটি ডিফল্ট অবস্থায় পাওয়া যায় না । ব্যবহারকারীকে বাটনটি টুলবারে টেনে আনতে হয়। <span id="result_box" lang="bn"><span class="hps">নিম্নলিখিত</span> <span class="hps">কোড</span> <span class="hps">টুলবারে</span> <span class="hps">আপনার</span> <span class="hps alt-edited">বাটন</span> <span class="hps alt-edited">স্থাপন করবে। </span></span>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.</p>
+<h3 id="নোট">নোট</h3>
+<ul>
+ <li><a href="/en/XUL_School/Appendix_B:_Install_and_Uninstall_Scripts#Install_Scripts">প্রথমবার চালনার সময়</a> একবার বাটন ঢোকান, অথবা একটি নতুন বাটন যোগ করে যখন একটি এক্সটেনশন আপডেট হয়।</li>
+ <li>Please only add your button by default if it adds real value to the user and will be a frequent entry point to your extension.</li>
+ <li>You <b>must not</b> insert your toolbar button between any of the following elements: the combined back/forward button, the location bar, the stop botton, or the reload button. These elements have special behaviors when placed next to eachother, and will break if separated by another element.</li>
+</ul>
+<pre class="brush: js">/**
+ * 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 &amp;&amp; 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");
+}
+</pre>
+<h2 id="আরো_দেখুন">আরো দেখুন</h2>
+<ul>
+ <li><a class="external" href="http://blog.pearlcrescent.com/archives/24">Programmatically adding items to the Firefox toolbar</a></li>
+ <li><a class="external" href="http://forums.mozillazine.org/viewtopic.php?t=189667">Toolbar button on install</a></li>
+ <li>{{ Bug(242071) }}</li>
+</ul>