This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Based on fantastic jQuery useragent parser plugin https://gist.github.com/373298 | |
| function parse(uaStr) { | |
| var agent = { | |
| platform: {}, | |
| browser: {}, | |
| engine: {} | |
| }; | |
| var ua = uaStr, | |
| p = agent.platform, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| env = (function() { | |
| var flags = {}, ua = navigator.userAgent, el = document.createElement('div'), video = document.createElement('video'), audio = document.createElement('audio'), root = document.documentElement, i | |
| function flag(names) { | |
| names = names.split(' ') | |
| for (i = 0; i < names.length; i++) | |
| flags[names[i]] = true | |
| } | |
| function classnames() { | |
| var names = [], name | |
| for(name in flags) if (flags.hasOwnProperty(name)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Disable Context Menu | |
| document.oncontextmenu = function () { | |
| return false | |
| }; | |
| // Disable dragging of HTML elements | |
| document.ondragstart = function () { | |
| return false | |
| }; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Usage: | |
| * Send the url you want to access url encoded in the url paramater, for example (This is with JS): | |
| * /twitter-proxy.php?url='+encodeURIComponent('statuses/user_timeline.json?screen_name=MikeRogers0&count=2') | |
| */ | |
| // The tokens, keys and secrets from the app you created at https://dev.twitter.com/apps | |
| $config = array( |
NewerOlder