From c1eda03445adfef79cb1657264ab537f0cb5bc16 Mon Sep 17 00:00:00 2001 From: Thomas Brouard Date: Wed, 2 Nov 2016 12:41:18 +0100 Subject: [PATCH] Change default selectors --- README.md | 18 +++++++++--------- index.js | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 82ee523..97a76e2 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,9 @@ $ npm install --save electron-tabs Add the following elements in the page HTML: ```html -
-
-
+
+
+
``` And call the module in the renderer process: @@ -47,11 +47,11 @@ Represents the main tab container. `options` must be an object. The following options are available: -* `tabContainerSelector` (default: `".tabs-tabcontainer"`): CSS selector to target the element where tabs are inserted. -* `buttonsContainerSelector` (default: `".tabs-buttonscontainer"`): CSS selector to target the element where the "New Tab" button are inserted. -* `viewContainerSelector` (default: `".tabs-viewcontainer"`): CSS selector to target the element where the view are inserted. -* `tabClass` (default: `"tabs-tab"`): class to add to tab elements. -* `viewClass` (default: `"tabs-view"`): class to add to webview elements. +* `tabContainerSelector` (default: `".etabs-tabs"`): CSS selector to target the element where tabs are inserted. +* `buttonsContainerSelector` (default: `".etabs-buttons"`): CSS selector to target the element where the "New Tab" button are inserted. +* `viewContainerSelector` (default: `".etabs-views"`): CSS selector to target the element where the view are inserted. +* `tabClass` (default: `"etabs-tab"`): class to add to tab elements. +* `viewClass` (default: `"etabs-view"`): class to add to webview elements. * `closeButtonText` (default: `"❌"`): "close tab" button text. * `newTabButtonText` (default: `"+"`): "New Tab" button text. * `newTab` (default: `undefined`): arguments to use when `.addTab()` is called without parameters. It can be an object or a function which returns an object. It determines the options to use when the "New Tab" button is triggered. If you leave it undefined then the "New Tab" button won't be displayed. @@ -141,4 +141,4 @@ The following events are available: ## License -The MIT License (MIT) - Copyright (c) 2016 Thomas Brouard \ No newline at end of file +The MIT License (MIT) - Copyright (c) 2016 Thomas Brouard diff --git a/index.js b/index.js index dcde6f8..cd3b4f2 100644 --- a/index.js +++ b/index.js @@ -31,11 +31,11 @@ class TabGroup extends EventEmitter { constructor (args = {}) { super(); let options = this.options = { - tabContainerSelector: args.tabContainerSelector || ".tabs-tabcontainer", - buttonsContainerSelector: args.buttonsContainerSelector || ".tabs-buttonscontainer", - viewContainerSelector: args.viewContainerSelector || ".tabs-viewcontainer", - tabClass: args.tabClass || "tabs-tab", - viewClass: args.viewClass || "tabs-view", + tabContainerSelector: args.tabContainerSelector || ".etabs-tabs", + buttonsContainerSelector: args.buttonsContainerSelector || ".etabs-buttons", + viewContainerSelector: args.viewContainerSelector || ".etabs-views", + tabClass: args.tabClass || "etabs-tab", + viewClass: args.viewClass || "etabs-view", closeButtonText: args.closeButtonText || "❌", newTab: args.newTab, newTabButtonText: args.newTabButton || "+",