Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

Commit 45a0f77

Browse files
added ga event for language changes (#294)
* added ga event for language changes. * remove instagram link, made cordova links all https because they were broken * fixed a few more http links to be https
1 parent 6e36caa commit 45a0f77

File tree

12 files changed

+40
-40
lines changed

12 files changed

+40
-40
lines changed

assets/scripts/main.js

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,37 @@
11
function getBaseUrl(urlString) {
2-
return urlString.replace(/https?:\/\//i, '').split('/')[0];
2+
return urlString.replace(/https?:\/\//i, '').split('/')[0];
33
}
44

55

6-
document.addEventListener('DOMContentLoaded', function(event) {
7-
var toggleButton = Sizzle('.mobile-docs-toggle')[0];
8-
var sidebar = Sizzle ('aside.sidebar')[0];
9-
var body = Sizzle ('body')[0];
6+
document.addEventListener('DOMContentLoaded', function (event) {
7+
var toggleButton = Sizzle('.mobile-docs-toggle')[0];
8+
var sidebar = Sizzle('aside.sidebar')[0];
9+
var body = Sizzle('body')[0];
1010

11-
toggleButton.addEventListener("click", function(e){
12-
sidebar.classList.toggle('open');
13-
body.classList.toggle('menu-open');
14-
});
11+
toggleButton.addEventListener("click", function (e) {
12+
sidebar.classList.toggle('open');
13+
body.classList.toggle('menu-open');
14+
});
1515

16-
var languageSelect = Sizzle('#language-select')[0];
17-
var currentUrl = window.location.href;
18-
var urlArray = currentUrl.replace(/https?:\/\//i, '').split('/');
19-
for (i = 0; i < languageSelect.children.length; i++) {
20-
var option = languageSelect.children[i];
21-
if (getBaseUrl(currentUrl) === getBaseUrl(option.value)) {
22-
languageSelect.selectedIndex = i;
16+
var languageSelect = Sizzle('#language-select')[0];
17+
var currentUrl = window.location.href;
18+
var urlArray = currentUrl.replace(/https?:\/\//i, '').split('/');
19+
for (i = 0; i < languageSelect.children.length; i++) {
20+
var option = languageSelect.children[i];
21+
if (getBaseUrl(currentUrl) === getBaseUrl(option.value)) {
22+
languageSelect.selectedIndex = i;
23+
}
2324
}
24-
}
2525

26-
languageSelect.addEventListener("change", function(e){
27-
urlArray.shift();
28-
var newUrl = e.target.value + urlArray.join('/');
29-
window.location = newUrl;
30-
});
31-
/*function resize() {
32-
if (window.innerWidth>=820 && sidebar.classList.contains('open'))
33-
sidebar.classList.toggle('open');
34-
}
35-
window.addEventListener("resize", resize);*/
26+
languageSelect.addEventListener("change", function (e) {
27+
ga('send','event','languageChange',e.target.value,languageSelect.options[languageSelect.selectedIndex].text);
28+
urlArray.shift();
29+
var newUrl = e.target.value + urlArray.join('/');
30+
window.location = newUrl;
31+
});
32+
/*function resize() {
33+
if (window.innerWidth>=820 && sidebar.classList.contains('open'))
34+
sidebar.classList.toggle('open');
35+
}
36+
window.addEventListener("resize", resize);*/
3637
});

docs/1-getting-started/1-install-phonegap/2-cli.html.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The PhoneGap CLI provides a command line interface for creating PhoneGap apps as
1818

1919
There are a few simple requirements you'll need prior to installing the PhoneGap CLI:
2020

21-
- [node.js](http://nodejs.org/) - a JavaScript runtime to build your JavaScript code
21+
- [node.js](https://nodejs.org/) - a JavaScript runtime to build your JavaScript code
2222
- [git](http://git-scm.com) - used in the background by the CLI to download assets. It comes pre-installed on some operating systems.
2323

2424
To see if you already have it installed, type `git` from the command line.

docs/2-tutorials/2-develop/1-embed-webview/1-ios.html.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ When an error results, you will likely want to pass a message or object back ind
486486
pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"Arg was null"];
487487
```
488488

489-
For a list of the different result types, see [this doc](http://cordova.apache.org/docs/en/edge/guide_hybrid_plugins_index.md.html#Plugin%20Development%20Guide).
489+
For a list of the different result types, see [this doc](https://cordova.apache.org/docs/en/edge/guide_hybrid_plugins_index.md.html#Plugin%20Development%20Guide).
490490

491491
### Create a Cordova Plugin
492492

docs/2-tutorials/2-develop/1-embed-webview/3-android-with-extension.html.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ This tutorial will show you how to add PhoneGap/Cordova support to an existing A
7979

8080
### Set up PhoneGap/Cordova in your project
8181

82-
* Make sure you have [NodeJS](https://nodejs.org) installed. If you already have [NodeJS](https://nodejs.org) installed make sure you `npm install -g plugman`
82+
* Make sure you have [NodeJS](https://nodejs.org) installed. If you already have NodeJS installed make sure you `npm install -g plugman`
8383
* Go to **Android Studio** > `Preferences` > `Plugins` and click on _Browse Repositories_ button.
8484
* Search for `PhoneGap` and install it. Make sure you don't install the **PhoneGap/Cordova Plugin**
8585
* Restart **Android Studio**

docs/3-references/0-index.html.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ layout: subpage
1414
<li>[Plugin APIs](plugin-apis)</li>
1515
</ul>
1616

17-
If you're looking for information on the Cordova CLI or specific Cordova configuration, you should refer to the [Official Apache Cordova Documentation](http://cordova.apache.org/docs/en/latest/).
17+
If you're looking for information on the Cordova CLI or specific Cordova configuration, you should refer to the [Official Apache Cordova Documentation](https://cordova.apache.org/docs/en/latest/).

docs/3-references/developer-app/5-debugging.html.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ more complete control over your debugging environment you should plan to use the
1515

1616
You can run weinre on your local machine and use it to debug your application being served from either the PhoneGap Desktop App or the PhoneGap CLI.
1717

18-
1. Install weinre using npm (requires [Node.js](http://nodejs.org))
18+
1. Install weinre using npm (requires [Node.js](https://nodejs.org))
1919

2020
```sh
2121
$ sudo npm install -g weinre

docs/3-references/phonegap-cli/0-index.html.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ The sections covered in this reference include:
3333
- [Sending Push Notifications](/references/phonegap-cli/push)
3434

3535
<div class="alert--info">**NOTE:** The PhoneGap CLI is built as a layer on top of the Apache Cordova CLI, so any command that can be used in Cordova
36-
is also supported by the PhoneGap CLI. This guide will detail the *additional* features that distinguish the PhoneGap CLI from the Cordova CLI and should be used along with the [Cordova CLI Reference](http://cordova.apache.org/docs/en/edge/index.html). For more details on the difference between PhoneGap and Apache Cordova, check out [this page](/getting-started/5-going-further).</div>
36+
is also supported by the PhoneGap CLI. This guide will detail the *additional* features that distinguish the PhoneGap CLI from the Cordova CLI and should be used along with the [Cordova CLI Reference](https://cordova.apache.org/docs/en/edge/index.html). For more details on the difference between PhoneGap and Apache Cordova, check out [this page](/getting-started/5-going-further).</div>

docs/3-references/phonegap-cli/1-install.html.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ layout: subpage
66

77
There are a few basic requirements you'll need prior to installing the PhoneGap CLI:
88

9-
- [Node.js](http://nodejs.org/) - a JavaScript runtime to build your JavaScript code
9+
- [Node.js](https://nodejs.org/) - a JavaScript runtime to build your JavaScript code
1010
- [git](http://git-scm.com) - used in the background by the CLI to download assets. It comes pre-installed on some operating systems. You can check if it's already installed by typing `git` from the command line.
1111

1212
## Install via npm
@@ -47,6 +47,6 @@ Use the PhoneGap CLI to create and configure your apps locally, then build and p
4747

4848
### 3 - Standalone
4949

50-
The PhoneGap CLI can be used to do everything from creating your apps to packaging them for distribution. To build, run and package apps for multiple platforms you'll need to install some additional SDK's and/or tools for the platforms you wish to target. Refer to the [Cordova Platform Guides](http://cordova.apache.org/docs/en/edge/index.html) for details on how to proceed for each platform.
50+
The PhoneGap CLI can be used to do everything from creating your apps to packaging them for distribution. To build, run and package apps for multiple platforms you'll need to install some additional SDK's and/or tools for the platforms you wish to target. Refer to the [Cordova Platform Guides](https://cordova.apache.org/docs/en/edge/index.html) for details on how to proceed for each platform.
5151

5252
<div class="alert--tip">**TIP:** If you're developing for iOS on a Mac, you may want to install the [ios-sim](https://github.com/phonegap/ios-sim#installation) iOS simulator to emulate easily from the command line rather than going into Xcode.</div>

docs/3-references/plugin-apis.html.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ The most current version of the Cordova Core Plugin APIs are found in their resp
3030

3131
## General Plugin Discovery
3232

33-
You can also find a full directory of Cordova Plugins on the [Cordova Plugin page](http://cordova.apache.org/plugins/)
33+
You can also find a full directory of Cordova Plugins on the [Cordova Plugin page](https://cordova.apache.org/plugins/)

docs/4-phonegap-build/2-configuring/0-index.html.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ PhoneGap applications are configured using a `config.xml` file. This should be a
1010

1111
The `config.xml` file follows the [W3C widget specification](http://www.w3.org/TR/widgets/). It allows developers to easily specify metadata about their applications. You can see a sample `config.xml` with our [PhoneGap Start](https://github.com/phonegap/phonegap-start/blob/master/www/config.xml) application.
1212

13-
We're continually adding features to our `config.xml` support to give PhoneGap Build developers more power to customize their apps. If there are any specific features you'd like to see support for, [please let us know](http://forums.adobe.com/community/phonegap/build).
13+
We're continually adding features to our `config.xml` support to give PhoneGap Build developers more power to customize their apps. If there are any specific features you'd like to see support for, [please let us know](https://forums.adobe.com/community/phonegap/build).
1414

1515
1. [Essential Properties](#props)
1616
1. [Example config.xml](#example)
@@ -60,7 +60,7 @@ You can have zero or more of these elements present in your <code>config.xml</co
6060
<platform name="winphone" />
6161
```
6262

63-
All of the above fields are standard Cordova config.xml tags. For more detailed info about the above elements, and all the others available, see [the Cordova config.xml documentation](http://cordova.apache.org/docs/en/latest/config_ref/index.html). Most of these will work on PhoneGap Build, but if you face issues with any specific tags, [let us know](https://forums.adobe.com/community/phonegap/build).
63+
All of the above fields are standard Cordova config.xml tags. For more detailed info about the above elements, and all the others available, see [the Cordova config.xml documentation](https://cordova.apache.org/docs/en/latest/config_ref/index.html). Most of these will work on PhoneGap Build, but if you face issues with any specific tags, [let us know](https://forums.adobe.com/community/phonegap/build).
6464

6565
<a class="anchor" id="example"></a>
6666

docs/4-phonegap-build/2-configuring/plugins.html.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Plugins can be from <a href="https://build.phonegap.com/plugins" target="_blank"
1010

1111
Plugins need to be implemented differently for each platform, and may not be supported across all PhoneGap platforms. If you're deploying across multiple platforms, ensure that the experience degrades gracefully for users who do not have the plugin available.
1212

13-
If you would like to develop and publish your a plugin to be used by the community, [please see the Plugin Development Guide at Apache Cordova](http://cordova.apache.org/docs/en/latest/guide/hybrid/plugins/index.html). To submit a plugin to <a href="https://www.npmjs.com/">npm</a> please view their <a href="https://docs.npmjs.com/getting-started/publishing-npm-packages">documentation</a>.
13+
If you would like to develop and publish your a plugin to be used by the community, [please see the Plugin Development Guide at Apache Cordova](https://cordova.apache.org/docs/en/latest/guide/hybrid/plugins/index.html). To submit a plugin to <a href="https://www.npmjs.com/">npm</a> please view their <a href="https://docs.npmjs.com/getting-started/publishing-npm-packages">documentation</a>.
1414

1515
## Including a plugin in your project
1616

layouts/includes/site-footer.jade

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ footer.site-footer
3838
li: a(href='http://www.facebook.com/PhoneGap') Facebook
3939
li: a(href='https://plus.google.com/communities/111220599704908202107') Google+
4040
li: a(href='https://www.youtube.com/user/phonegap') YouTube
41-
li: a(href='https://instagram.com/phonegap/') Instagram
4241
.subscribe
4342
.subscribe__description
4443
h4.site-footer__title Stay Connected to PhoneGap

0 commit comments

Comments
 (0)