Skip to content
This repository has been archived by the owner on May 10, 2019. It is now read-only.

Commit

Permalink
Merge pull request #2202 from mozilla/issue_1438_tos_priv
Browse files Browse the repository at this point in the history
Add a console message if only one of privacyPolicy or termsOfService is defined.

Adding @seanmonstar's suggestion to the PR which already got a "looks good from here"

close #1438
  • Loading branch information
Shane Tomlinson committed Aug 10, 2012
2 parents eb4d539 + d49369f commit cc0ba1c
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions resources/static/include_js/include.js
Original file line number Diff line number Diff line change
Expand Up @@ -1076,13 +1076,25 @@
}
}

function warn(message) {
try {
console.warn(message);
} catch(e) {
/* ignore error */
}
}

function internalRequest(options) {
if (options.requiredEmail) {
try {
console.log("requiredEmail has been deprecated");
} catch(e) {
/* ignore error */
}
warn("requiredEmail has been deprecated");
}

if (options.termsOfService && !options.privacyPolicy) {
warn("termsOfService ignored unless privacyPolicy also defined");
}

if (options.privacyPolicy && !options.termsOfService) {
warn("privacyPolicy ignored unless termsOfService also defined");
}

// focus an existing window
Expand Down

0 comments on commit cc0ba1c

Please sign in to comment.