{"id":19621517,"url":"https://github.com/commenthol/node-smartbanner","last_synced_at":"2026-05-14T17:35:48.504Z","repository":{"id":12686797,"uuid":"15358995","full_name":"commenthol/node-smartbanner","owner":"commenthol","description":null,"archived":false,"fork":false,"pushed_at":"2013-12-27T10:19:27.000Z","size":480,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T09:01:46.553Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/commenthol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-21T13:08:23.000Z","updated_at":"2024-04-14T09:01:46.553Z","dependencies_parsed_at":"2022-09-02T11:02:03.242Z","dependency_job_id":null,"html_url":"https://github.com/commenthol/node-smartbanner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/commenthol/node-smartbanner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fnode-smartbanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fnode-smartbanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fnode-smartbanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fnode-smartbanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/commenthol","download_url":"https://codeload.github.com/commenthol/node-smartbanner/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fnode-smartbanner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33035902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T11:23:22.991Z","updated_at":"2026-05-14T17:35:48.476Z","avatar_url":"https://github.com/commenthol.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-smartbanner\n\n[Smart Banners](http://developer.apple.com/library/ios/#documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html) are a new feature in iOS 6 to promote apps on the App Store from a website using meta tags.\n\nSometimes you might want a bit more control on when things get displayed as well as a promotion of your Google Play or Windows Phone App then this express middleware and client script might be useful.\n\nThe client side script is currently based on [xui](http://xuijs.com). \nNote: You'll need to run at least node version 0.8.24 (bugfix for https server requests required).\n\nThis project is inspired by [jquery.smartbanner](https://github.com/jasny/jquery.smartbanner). Thanks.\n\n## How does it look\n\n\u003ctable\u003e\n\u003cthead\u003e\n\t\u003ctd\u003eiOs\u003c/td\u003e\n\t\u003ctd\u003eAndroid\u003c/td\u003e\n\t\u003ctd\u003eWP\u003c/td\u003e\n\u003c/thead\u003e\n\u003ctr\u003e\n\t\u003ctd valign=\"top\"\u003e\n\t\t\u003cimg src=\"doc/screenshot-ios.png\" width=\"240px\"/\u003e\n\t\u003c/td\u003e\n\t\u003ctd valign=\"top\"\u003e\n\t\t\u003cimg src=\"doc/screenshot-android.png\" width=\"240px\"/\u003e\n\t\u003c/td\u003e\n\t\u003ctd valign=\"top\"\u003e\n\t\t\u003cimg src=\"doc/screenshot-wp.png\" width=\"240px\"/\u003e\n\t\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## How it works\n\nThe client side script `xui.smartbanner.js` parses the User-Agent and sends off a request to the node-server running `smartbanner`. From there a backend request is issued to retrieve data from the respective App-Store.\nWith this data, containing Title, Name, Rating, and Price, the \"smartbanner\" is returned.\n\n# Usage\n\nOn node using express include:\n\n```js\nvar smartbanner = require('./smartbanner');\n\n...\n\n/**\n * include smartbanner \n */\napp.get('/smartbanner/*', smartbanner );\n```\n\nIf you need a different configuration e.g. different language settings, please take a look in `config.js`.\n\nOn the bottom of your page which shall contain a smartbanner with the appIds of the different stores:\n\n```html\n\t\u003cscript src=\"js/xui-2.3.2.js\"\u003e\u003c/script\u003e\n\t\u003cscript src=\"js/xui.smartbanner.js\"\u003e\u003c/script\u003e\n\t\u003cscript\u003e\n\tx$().smartbanner({ \n\t\t// add here the appIds of your Apps\n\t\tappId: {\n\t\t\tios: \"725989866\",\n\t\t\tandroid: \"com.crowdstar.avatar\",\n\t\t\twindowsphone: \"37527bf3-5820-43e5-9ae3-be310466fea4\",\n\t\t},\n\t\tdaysHidden: 0,   // Duration to hide the banner after being closed (0 = always show banner)\n\t\tdaysReminder: 0, // Duration to hide the banner after \"VIEW\" is clicked *separate from when the close button is clicked* (0 = always show banner)\n\t\t//~ force: 'ios', // 'ios' 'android' 'windowsphone' uncomment to force display\n\t});\n\t\u003c/script\u003e\n```\n\n## Try it\n\nThere is a sample app in `test/app`.\n\n```bash\nnpm start\n```\n\nAccess it with [http://localhost:3000](http://localhost:3000)\n\n## Contribution and License Agreement\n\nIf you contribute code to this project, you are implicitly allowing your code to be distributed under the MIT license. You are also implicitly verifying that all code is your original work. \n\n# License\n\nCopyright (c) 2013 Commenthol under [MIT](./LICENSE).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommenthol%2Fnode-smartbanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommenthol%2Fnode-smartbanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommenthol%2Fnode-smartbanner/lists"}