{"id":166,"date":"2013-04-02T14:59:39","date_gmt":"2013-04-02T01:59:39","guid":{"rendered":"http:\/\/eion.robbmob.com\/blog\/?p=166"},"modified":"2013-04-02T14:59:39","modified_gmt":"2013-04-02T01:59:39","slug":"win8-js-privacy-policy-settings","status":"publish","type":"post","link":"https:\/\/eion.robbmob.com\/blog\/2013\/04\/02\/win8-js-privacy-policy-settings\/","title":{"rendered":"Win8 JS Privacy Policy Settings"},"content":{"rendered":"<p>As <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/windows\/apps\/hh694083.aspx#acr_4_1_1\" target=\"_blank\" rel=\"nofollow\">part of the Windows 8 App Store requirements<\/a>, if your app has internet\/network connectivity then you&#8217;re required to not only have a privacy policy in your app store description, but also as a Charms menu item. Unfortunately all the docs suck for how to add a simple charms menu item to open the privacy policy in a new window using JavaScript \ud83d\ude42<\/p>\n<p>After lots of digging, I&#8217;ve come up with a simple bit of JavaScript code, that should also let you add other Charms Settings menu settings without tearing your eyes out trying to read the docs.<br \/>\n<code style=\"white-space: pre;\"><br \/>\nvar settingsPane = Windows.UI.ApplicationSettings.SettingsPane.getForCurrentView();<br \/>\nfunction commandsRequested(eventArgs) {<br \/>\n\tvar applicationCommands = eventArgs.request.applicationCommands;<br \/>\n\tvar privacyCommand = new Windows.UI.ApplicationSettings.SettingsCommand('privacy', 'Privacy Policy', function() {<br \/>\n\t\twindow.open('www.link.to.your\/privacy_policy.html');<br \/>\n\t});<br \/>\n\tapplicationCommands.append(privacyCommand);<br \/>\n}<br \/>\nsettingsPane.addEventListener(\"commandsrequested\", commandsRequested);<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>As part of the Windows 8 App Store requirements, if your app has internet\/network connectivity then you&#8217;re required to not only have a privacy policy in your app store description, but also as a Charms menu item. Unfortunately all the docs suck for how to add a simple charms menu item to open the privacy [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[8],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3CEsE-2G","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/eion.robbmob.com\/blog\/wp-json\/wp\/v2\/posts\/166"}],"collection":[{"href":"https:\/\/eion.robbmob.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eion.robbmob.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eion.robbmob.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eion.robbmob.com\/blog\/wp-json\/wp\/v2\/comments?post=166"}],"version-history":[{"count":0,"href":"https:\/\/eion.robbmob.com\/blog\/wp-json\/wp\/v2\/posts\/166\/revisions"}],"wp:attachment":[{"href":"https:\/\/eion.robbmob.com\/blog\/wp-json\/wp\/v2\/media?parent=166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eion.robbmob.com\/blog\/wp-json\/wp\/v2\/categories?post=166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eion.robbmob.com\/blog\/wp-json\/wp\/v2\/tags?post=166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}