{"action":"created","comment":{"url":"https://api.github.com/repos/tgstation/-tg-station/pulls/comments/31967279","id":31967279,"diff_hunk":"@@ -264,6 +264,14 @@ var/next_external_rsc = 0\n \r\n //send resources to the client. It's here in its own proc so we can move it around easiliy if need be\r\n /client/proc/send_resources()\r\n+\r\n+\tspawn\r\n+\t\t// Preload the HTML interface. This needs to be done due to BYOND bug http://www.byond.com/forum/?post=1487244\r\n+\t\tvar/datum/html_interface/hi\r\n+\t\tfor (var/type in typesof(/datum/html_interface))\r\n+\t\t\thi = new type(null)\r\n+\t\t\thi.sendResources(src)\r\n+\r","path":"code/modules/client/client procs.dm","position":11,"original_position":11,"commit_id":"3337dc7fee4f703893cbd1d6d8cf8706a2d85a51","original_commit_id":"3337dc7fee4f703893cbd1d6d8cf8706a2d85a51","user":{"login":"Aranclanos","id":701959,"avatar_url":"https://avatars.githubusercontent.com/u/701959?v=3","gravatar_id":"","url":"https://api.github.com/users/Aranclanos","html_url":"https://github.com/Aranclanos","followers_url":"https://api.github.com/users/Aranclanos/followers","following_url":"https://api.github.com/users/Aranclanos/following{/other_user}","gists_url":"https://api.github.com/users/Aranclanos/gists{/gist_id}","starred_url":"https://api.github.com/users/Aranclanos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aranclanos/subscriptions","organizations_url":"https://api.github.com/users/Aranclanos/orgs","repos_url":"https://api.github.com/users/Aranclanos/repos","events_url":"https://api.github.com/users/Aranclanos/events{/privacy}","received_events_url":"https://api.github.com/users/Aranclanos/received_events","type":"User","site_admin":false},"body":"its because the code is copypasted","created_at":"2015-06-08T22:37:26Z","updated_at":"2015-06-08T22:37:26Z","html_url":"https://github.com/tgstation/-tg-station/pull/9849#discussion_r31967279","pull_request_url":"https://api.github.com/repos/tgstation/-tg-station/pulls/9849","_links":{"self":{"href":"https://api.github.com/repos/tgstation/-tg-station/pulls/comments/31967279"},"html":{"href":"https://github.com/tgstation/-tg-station/pull/9849#discussion_r31967279"},"pull_request":{"href":"https://api.github.com/repos/tgstation/-tg-station/pulls/9849"}}},"pull_request":{"url":"https://api.github.com/repos/tgstation/-tg-station/pulls/9849","id":37191184,"html_url":"https://github.com/tgstation/-tg-station/pull/9849","diff_url":"https://github.com/tgstation/-tg-station/pull/9849.diff","patch_url":"https://github.com/tgstation/-tg-station/pull/9849.patch","issue_url":"https://api.github.com/repos/tgstation/-tg-station/issues/9849","number":9849,"state":"open","locked":false,"title":"HTML interface module + playing cards using the new module","user":{"login":"nullquery","id":5695364,"avatar_url":"https://avatars.githubusercontent.com/u/5695364?v=3","gravatar_id":"","url":"https://api.github.com/users/nullquery","html_url":"https://github.com/nullquery","followers_url":"https://api.github.com/users/nullquery/followers","following_url":"https://api.github.com/users/nullquery/following{/other_user}","gists_url":"https://api.github.com/users/nullquery/gists{/gist_id}","starred_url":"https://api.github.com/users/nullquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nullquery/subscriptions","organizations_url":"https://api.github.com/users/nullquery/orgs","repos_url":"https://api.github.com/users/nullquery/repos","events_url":"https://api.github.com/users/nullquery/events{/privacy}","received_events_url":"https://api.github.com/users/nullquery/received_events","type":"User","site_admin":false},"body":"_Ported from Baystation12 upon request of @HoaxIT_\r\nOriginal PR @ https://github.com/Baystation12/Baystation12/pull/9732\r\n\r\nThis PR introduces a new method of dealing with HTML browser windows. My intention is to replace every component in the game that uses browse() with this module.\r\n\r\nThe module is documented in the main file and there's an example in the form of playing cards which have been modified to use the new system.\r\n\r\nThere are a lot of improvements to this system over the older systems, notably that it remains easy-to-use yet refreshes parts of the screen without flicker. Unlike NanoUI you specify the parts to replace directly in the source-code, there is no need to tinker with templates.\r\n\r\nThe HTML windows opened contain the latest stable/legacy version of jQuery for ease-of-use. It's possible to send Javascript calls directly using a function or you can just define something yourself through HTML.\r\n\r\nThis includes 3 possible versions of the window. The basic template is in /datum/html_interface and consists of a simple window with a browser component. /datum/html_interface/nanotrasen is the NanoUI-lookalike with a custom titlebar. I have yet to acquire icons for the minus and close buttons but I'm sure someone else can oblige in this regard (this component is not yet in use, by the time it becomes in use I hope to have those sprites).\r\n\r\nFinally there's /datum/html_interface/cards for the playing cards. They need a subtype because the playing cards have their own resources which need to be preloaded by the client.\r\n\r\nFuture contributions to the module will be a generic way of authenticating ID cards, so that the computers on the station can be ported to make use of the new system.\r\n\r\nIdeally NanoUI becomes deprecated, I'm not sure what the feeling about that is but I think it's necessary to keep the system as simple as possible.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/5695364/8044244/b3a5d150-0e2b-11e5-9d88-ecfdeb049fce.png)\r\n","created_at":"2015-06-08T20:15:07Z","updated_at":"2015-06-08T22:37:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"142efa3a4dcc75b03d8c09814d8e31d9a973d94b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tgstation/-tg-station/pulls/9849/commits","review_comments_url":"https://api.github.com/repos/tgstation/-tg-station/pulls/9849/comments","review_comment_url":"https://api.github.com/repos/tgstation/-tg-station/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tgstation/-tg-station/issues/9849/comments","statuses_url":"https://api.github.com/repos/tgstation/-tg-station/statuses/3337dc7fee4f703893cbd1d6d8cf8706a2d85a51","head":{"label":"nullstation:master","ref":"master","sha":"3337dc7fee4f703893cbd1d6d8cf8706a2d85a51","user":{"login":"nullstation","id":12785354,"avatar_url":"https://avatars.githubusercontent.com/u/12785354?v=3","gravatar_id":"","url":"https://api.github.com/users/nullstation","html_url":"https://github.com/nullstation","followers_url":"https://api.github.com/users/nullstation/followers","following_url":"https://api.github.com/users/nullstation/following{/other_user}","gists_url":"https://api.github.com/users/nullstation/gists{/gist_id}","starred_url":"https://api.github.com/users/nullstation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nullstation/subscriptions","organizations_url":"https://api.github.com/users/nullstation/orgs","repos_url":"https://api.github.com/users/nullstation/repos","events_url":"https://api.github.com/users/nullstation/events{/privacy}","received_events_url":"https://api.github.com/users/nullstation/received_events","type":"Organization","site_admin":false},"repo":{"id":37089728,"name":"-tg-station","full_name":"nullstation/-tg-station","owner":{"login":"nullstation","id":12785354,"avatar_url":"https://avatars.githubusercontent.com/u/12785354?v=3","gravatar_id":"","url":"https://api.github.com/users/nullstation","html_url":"https://github.com/nullstation","followers_url":"https://api.github.com/users/nullstation/followers","following_url":"https://api.github.com/users/nullstation/following{/other_user}","gists_url":"https://api.github.com/users/nullstation/gists{/gist_id}","starred_url":"https://api.github.com/users/nullstation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nullstation/subscriptions","organizations_url":"https://api.github.com/users/nullstation/orgs","repos_url":"https://api.github.com/users/nullstation/repos","events_url":"https://api.github.com/users/nullstation/events{/privacy}","received_events_url":"https://api.github.com/users/nullstation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nullstation/-tg-station","description":"the /tg/station branch of SS13","fork":true,"url":"https://api.github.com/repos/nullstation/-tg-station","forks_url":"https://api.github.com/repos/nullstation/-tg-station/forks","keys_url":"https://api.github.com/repos/nullstation/-tg-station/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nullstation/-tg-station/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nullstation/-tg-station/teams","hooks_url":"https://api.github.com/repos/nullstation/-tg-station/hooks","issue_events_url":"https://api.github.com/repos/nullstation/-tg-station/issues/events{/number}","events_url":"https://api.github.com/repos/nullstation/-tg-station/events","assignees_url":"https://api.github.com/repos/nullstation/-tg-station/assignees{/user}","branches_url":"https://api.github.com/repos/nullstation/-tg-station/branches{/branch}","tags_url":"https://api.github.com/repos/nullstation/-tg-station/tags","blobs_url":"https://api.github.com/repos/nullstation/-tg-station/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nullstation/-tg-station/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nullstation/-tg-station/git/refs{/sha}","trees_url":"https://api.github.com/repos/nullstation/-tg-station/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nullstation/-tg-station/statuses/{sha}","languages_url":"https://api.github.com/repos/nullstation/-tg-station/languages","stargazers_url":"https://api.github.com/repos/nullstation/-tg-station/stargazers","contributors_url":"https://api.github.com/repos/nullstation/-tg-station/contributors","subscribers_url":"https://api.github.com/repos/nullstation/-tg-station/subscribers","subscription_url":"https://api.github.com/repos/nullstation/-tg-station/subscription","commits_url":"https://api.github.com/repos/nullstation/-tg-station/commits{/sha}","git_commits_url":"https://api.github.com/repos/nullstation/-tg-station/git/commits{/sha}","comments_url":"https://api.github.com/repos/nullstation/-tg-station/comments{/number}","issue_comment_url":"https://api.github.com/repos/nullstation/-tg-station/issues/comments{/number}","contents_url":"https://api.github.com/repos/nullstation/-tg-station/contents/{+path}","compare_url":"https://api.github.com/repos/nullstation/-tg-station/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nullstation/-tg-station/merges","archive_url":"https://api.github.com/repos/nullstation/-tg-station/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nullstation/-tg-station/downloads","issues_url":"https://api.github.com/repos/nullstation/-tg-station/issues{/number}","pulls_url":"https://api.github.com/repos/nullstation/-tg-station/pulls{/number}","milestones_url":"https://api.github.com/repos/nullstation/-tg-station/milestones{/number}","notifications_url":"https://api.github.com/repos/nullstation/-tg-station/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nullstation/-tg-station/labels{/name}","releases_url":"https://api.github.com/repos/nullstation/-tg-station/releases{/id}","created_at":"2015-06-08T20:02:21Z","updated_at":"2015-06-08T20:02:33Z","pushed_at":"2015-06-08T20:27:11Z","git_url":"git://github.com/nullstation/-tg-station.git","ssh_url":"git@github.com:nullstation/-tg-station.git","clone_url":"https://github.com/nullstation/-tg-station.git","svn_url":"https://github.com/nullstation/-tg-station","homepage":"http://www.tgstation13.org/","size":682215,"stargazers_count":0,"watchers_count":0,"language":"DM","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tgstation:master","ref":"master","sha":"389007d85d6bd731c2b94f3f6c5314376f132d09","user":{"login":"tgstation","id":1363778,"avatar_url":"https://avatars.githubusercontent.com/u/1363778?v=3","gravatar_id":"","url":"https://api.github.com/users/tgstation","html_url":"https://github.com/tgstation","followers_url":"https://api.github.com/users/tgstation/followers","following_url":"https://api.github.com/users/tgstation/following{/other_user}","gists_url":"https://api.github.com/users/tgstation/gists{/gist_id}","starred_url":"https://api.github.com/users/tgstation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgstation/subscriptions","organizations_url":"https://api.github.com/users/tgstation/orgs","repos_url":"https://api.github.com/users/tgstation/repos","events_url":"https://api.github.com/users/tgstation/events{/privacy}","received_events_url":"https://api.github.com/users/tgstation/received_events","type":"Organization","site_admin":false},"repo":{"id":3234987,"name":"-tg-station","full_name":"tgstation/-tg-station","owner":{"login":"tgstation","id":1363778,"avatar_url":"https://avatars.githubusercontent.com/u/1363778?v=3","gravatar_id":"","url":"https://api.github.com/users/tgstation","html_url":"https://github.com/tgstation","followers_url":"https://api.github.com/users/tgstation/followers","following_url":"https://api.github.com/users/tgstation/following{/other_user}","gists_url":"https://api.github.com/users/tgstation/gists{/gist_id}","starred_url":"https://api.github.com/users/tgstation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgstation/subscriptions","organizations_url":"https://api.github.com/users/tgstation/orgs","repos_url":"https://api.github.com/users/tgstation/repos","events_url":"https://api.github.com/users/tgstation/events{/privacy}","received_events_url":"https://api.github.com/users/tgstation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tgstation/-tg-station","description":"the /tg/station branch of SS13","fork":false,"url":"https://api.github.com/repos/tgstation/-tg-station","forks_url":"https://api.github.com/repos/tgstation/-tg-station/forks","keys_url":"https://api.github.com/repos/tgstation/-tg-station/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tgstation/-tg-station/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tgstation/-tg-station/teams","hooks_url":"https://api.github.com/repos/tgstation/-tg-station/hooks","issue_events_url":"https://api.github.com/repos/tgstation/-tg-station/issues/events{/number}","events_url":"https://api.github.com/repos/tgstation/-tg-station/events","assignees_url":"https://api.github.com/repos/tgstation/-tg-station/assignees{/user}","branches_url":"https://api.github.com/repos/tgstation/-tg-station/branches{/branch}","tags_url":"https://api.github.com/repos/tgstation/-tg-station/tags","blobs_url":"https://api.github.com/repos/tgstation/-tg-station/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tgstation/-tg-station/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tgstation/-tg-station/git/refs{/sha}","trees_url":"https://api.github.com/repos/tgstation/-tg-station/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tgstation/-tg-station/statuses/{sha}","languages_url":"https://api.github.com/repos/tgstation/-tg-station/languages","stargazers_url":"https://api.github.com/repos/tgstation/-tg-station/stargazers","contributors_url":"https://api.github.com/repos/tgstation/-tg-station/contributors","subscribers_url":"https://api.github.com/repos/tgstation/-tg-station/subscribers","subscription_url":"https://api.github.com/repos/tgstation/-tg-station/subscription","commits_url":"https://api.github.com/repos/tgstation/-tg-station/commits{/sha}","git_commits_url":"https://api.github.com/repos/tgstation/-tg-station/git/commits{/sha}","comments_url":"https://api.github.com/repos/tgstation/-tg-station/comments{/number}","issue_comment_url":"https://api.github.com/repos/tgstation/-tg-station/issues/comments{/number}","contents_url":"https://api.github.com/repos/tgstation/-tg-station/contents/{+path}","compare_url":"https://api.github.com/repos/tgstation/-tg-station/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tgstation/-tg-station/merges","archive_url":"https://api.github.com/repos/tgstation/-tg-station/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tgstation/-tg-station/downloads","issues_url":"https://api.github.com/repos/tgstation/-tg-station/issues{/number}","pulls_url":"https://api.github.com/repos/tgstation/-tg-station/pulls{/number}","milestones_url":"https://api.github.com/repos/tgstation/-tg-station/milestones{/number}","notifications_url":"https://api.github.com/repos/tgstation/-tg-station/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tgstation/-tg-station/labels{/name}","releases_url":"https://api.github.com/repos/tgstation/-tg-station/releases{/id}","created_at":"2012-01-21T17:32:47Z","updated_at":"2015-06-08T04:12:51Z","pushed_at":"2015-06-08T20:27:12Z","git_url":"git://github.com/tgstation/-tg-station.git","ssh_url":"git@github.com:tgstation/-tg-station.git","clone_url":"https://github.com/tgstation/-tg-station.git","svn_url":"https://github.com/tgstation/-tg-station","homepage":"http://www.tgstation13.org/","size":682215,"stargazers_count":219,"watchers_count":219,"language":"DM","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":749,"mirror_url":null,"open_issues_count":798,"forks":749,"open_issues":798,"watchers":219,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tgstation/-tg-station/pulls/9849"},"html":{"href":"https://github.com/tgstation/-tg-station/pull/9849"},"issue":{"href":"https://api.github.com/repos/tgstation/-tg-station/issues/9849"},"comments":{"href":"https://api.github.com/repos/tgstation/-tg-station/issues/9849/comments"},"review_comments":{"href":"https://api.github.com/repos/tgstation/-tg-station/pulls/9849/comments"},"review_comment":{"href":"https://api.github.com/repos/tgstation/-tg-station/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tgstation/-tg-station/pulls/9849/commits"},"statuses":{"href":"https://api.github.com/repos/tgstation/-tg-station/statuses/3337dc7fee4f703893cbd1d6d8cf8706a2d85a51"}}}}