{"id":169909,"date":"2013-03-11T18:57:03","date_gmt":"2013-03-11T14:57:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=169909"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=169909","title":{"rendered":"<span class=\"post_title\">\u041f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u0430<\/span>"},"content":{"rendered":"<div class=\"content html_format\">\n<blockquote><p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441 \u043d\u0443\u043b\u044f \u0432\u0438\u0434\u0436\u0435\u0442 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u0430 (\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u043e\u043f\u0440\u043e\u0441\u043e\u0432). \u0422.\u043a. \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0442\u0435\u043c\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u0430, \u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u043e\u043f\u0440\u043e\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u043e.<\/p><\/blockquote>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/b6d\/020\/262\/b6d020262be2cfbb84a5f56eb16aa48f.png\"\/><br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0428\u0430\u0433 1. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446 \u0432 \u0411\u0414<\/h4>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c MySQL.<br \/>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u0431\u043b\u0438\u0446:<\/p>\n<p>  polls \u2014 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441 \u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438<\/p>\n<pre><code class=\"sql\">CREATE TABLE `polls` ( `poll_id` INT(11) unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, `question` TEXT ) ENGINE = MYISAM AUTO_INCREMENT = 1 DEFAULT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI; <\/code><\/pre>\n<p>  answers \u2014 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438 \u0434\u043b\u044f \u043e\u043f\u0440\u043e\u0441\u043e\u0432<\/p>\n<pre><code class=\"sql\">CREATE TABLE `answers` ( `answer_id` INT(11) unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, `answer` TEXT, `num` INT(11) NOT NULL DEFAULT '0',\t\/\/ \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430 `poll_id_fk` INT NOT NULL DEFAULT '0', FOREIGN KEY (`poll_id_fk`) REFERENCES polls(`poll_id`) ) ENGINE = MYISAM AUTO_INCREMENT = 1 DEFAULT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI; <\/code><\/pre>\n<p>  <\/p>\n<h4>\u0428\u0430\u0433 2. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441 \u043e\u043f\u0440\u043e\u0441\u043e\u043c<\/h4>\n<p>  \u0411\u0443\u0434\u0435\u043c \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043f\u0440\u0435\u0434\u043f\u043e\u0441\u044b\u043b\u043a\u0438, \u0447\u0442\u043e \u043d\u0430\u0448 \u0432\u0438\u0434\u0436\u0435\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0439 \u0448\u0438\u0440\u0438\u043d\u044b (\u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0440\u0430\u0437\u0443\u043c\u043d\u043e\u0433\u043e), \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0432 \u043b\u044e\u0431\u044b\u0435 \u0441\u0430\u0439\u0442\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0446\u0435\u043d\u0442\u0440\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u043e \u0448\u0438\u0440\u0438\u043d\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0438\u043b\u0438 \u0432 \u0431\u043e\u043a\u043e\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0441\u0430\u0439\u0442\u0430 (\u043e\u0431\u044b\u0447\u043d\u043e \u0443\u0437\u043a\u0443\u044e). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441 \u043e\u043f\u0440\u043e\u0441\u043e\u043c \u0441\u0442\u0430\u0440\u0430\u0439\u0442\u0435\u0441\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u00ab\u0440\u0435\u0437\u0438\u043d\u043e\u0432\u044b\u0439\u00bb \u0434\u0438\u0437\u0430\u0439\u043d.<\/p>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c\u0441\u044f \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u043e\u043f\u0440\u043e\u0441\u0430.<\/p>\n<pre><code class=\"php\">&lt;?php \t\/\/ \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043d\u043e\u043c\u0435\u0440 \u043e\u043f\u0440\u043e\u0441\u0430 \t$poll_id = (int) (!isset($_GET[&quot;id&quot;]) ? -1 : 0 + $_GET[&quot;id&quot;]); \t\/\/ \u0435\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435 \u0442\u043e, \u0432\u044b\u0445\u043e\u0434\u0438\u043c \tif ($poll_id &lt;= 0) \t\texit; \t$sql = mysql_query(&quot;SELECT * FROM polls WHERE poll_id = $poll_id&quot;); \t\/\/ \u0435\u0441\u043b\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043b\u043e\u0441\u044c, \u0432\u044b\u0445\u043e\u0434\u0438\u043c \tif (!($sql && ($row = mysql_fetch_array($sql)))) \t\texit; \t\/\/ \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \t$question = $row['question'];  \t\/\/ IE \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u0447\u0443\u0436\u0438\u0435 cookie (\u0447\u0435\u0440\u0435\u0437 iframe), \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u044d\u0442\u0443 \u0441\u0442\u0440\u043e\u0447\u043a\u0443, \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442\u0435 \u0438\u0445 \u043f\u0438\u0441\u0430\u0442\u044c \theader('P3P:CP=&quot;IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT&quot;'); ?&gt; &lt;!DOCTYPE html&gt;  &lt;html lang=&quot;en&quot;&gt;  &lt;head&gt;  \t&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text\/html; charset=UTF-8&quot; \/&gt; \t&lt;style type=&quot;text\/css&quot;&gt; \t&lt;?php \t\t\/\/ \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0446\u0432\u0435\u0442 \u0444\u043e\u043d\u0430, \u0442\u043e \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u043c \u0435\u0433\u043e \t\tif (isset($_GET['bg_color'])) { \t\t\t$bg_color = $_GET['bg_color']; \t\t\techo &quot;html,body { background: #$bg_color; }&quot;; \t\t} \t?&gt; \t&lt;\/style&gt; &lt;\/head&gt;  &lt;body onresize=&quot;resize_canvas()&quot;&gt; \t&lt;?php \t\t\/\/ \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u043e\u043f\u0440\u043e\u0441 \u0441 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438 \t\techo &quot;&lt;h1&gt;$question&lt;\/h1&gt;&quot;; \t\t$sql = mysql_query(&quot;SELECT * FROM answers WHERE poll_id_fk = $poll_id ORDER BY num ASC&quot;); \t\tif ($sql) { \t\t\twhile ($row = mysql_fetch_array($sql)) { \t\t\t\t$answer = $row['answer']; \t\t\t\techo &quot;&lt;p&gt;$answer&lt;\/p&gt;&quot;; \t\t\t} \t\t} \t?&gt; \t&lt;script type=&quot;text\/javascript&quot;&gt; \t\t\/\/ \u044d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c\u0443 \u043e\u043a\u043d\u0443 \u0432\u044b\u0441\u043e\u0442\u0443 \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \t\t\/\/ \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u043a\u0440\u043e\u0441\u0441-\u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u043c\u0435\u043d\u0430 \t\tvar parent_url = decodeURIComponent(document.location.hash.replace(\/^#\/, '')); \t\tfunction send(msg) { \t\t\tXD.postMessage(msg, parent_url, parent); \t\t} \t\tfunction resize_canvas() { \t\t\tsend($('body').height()); \t\t} \t&lt;\/script&gt; &lt;\/body&gt; &lt;\/html&gt; <\/code><\/pre>\n<p>  \u0422.\u043a. \u043f\u0440\u0438\u043c\u0435\u0440 \u0443 \u043d\u0430\u0441 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0439, \u0442\u043e \u043c\u044b \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f, \u0432\u044b\u0432\u043e\u0434 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0438 \u0442.\u0434.<br \/>  \u0412 \u0442\u0435\u043a\u0441\u0442\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043a\u0430\u043a \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u043c\u043d\u043e\u0433\u043e \u0432\u0441\u0435\u0433\u043e \u0441\u0445\u043e\u0434\u0443 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0433\u043e, \u043d\u043e \u0432\u0441\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0441\u043d\u0438\u043c\u0443\u0442\u0441\u044f \u043f\u043e \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0448\u0430\u0433\u043e\u0432. \u041e\u0442\u043c\u0435\u0442\u0438\u043c \u0437\u0434\u0435\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a <b>onresize<\/b>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432\u044b\u0441\u043e\u0442\u0443 \u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u043e\u043a\u043d\u043e.<\/p>\n<h4>\u0428\u0430\u0433 3. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0434\u043b\u044f \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u043d\u0430 \u0441\u0430\u0439\u0442<\/h4>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0434\u0435-\u0444\u0430\u043a\u0442\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 iframe.<br \/>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0440\u044f\u0434 \u043f\u0440\u0438\u0447\u0438\u043d:<br \/>  1. \u0412\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u044b \u0441\u0430\u0439\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0448\u0438\u043b\u0438 \u0432\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432\u0430\u0448 \u0432\u0438\u0434\u0436\u0435\u0442 \u043d\u0435 \u0445\u043e\u0442\u044f\u0442, \u0447\u0442\u043e\u0431\u044b \u0447\u0443\u0436\u043e\u0439 \u043a\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0430\u043b \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u043c\u0443 (\u044d\u0442\u043e \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e).<br \/>  2. \u0412\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432\u0430\u0448 \u0432\u0438\u0434\u0436\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 iframe \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u0433\u043a\u043e \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043d\u0430\u0432\u044b\u043a\u043e\u0432 \u0438 \u0437\u043d\u0430\u043d\u0438\u0439.<br \/>  3. \u0418\u0437-\u0437\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u0432\u0430\u0448\u0435\u043c \u043a\u043e\u0434\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0435\u0442\u0435\u0442\u044c \u0432\u0435\u0440\u0441\u0442\u043a\u0430 \u0441\u0430\u0439\u0442\u0430, \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u0432\u0430\u0448 \u0432\u0438\u0434\u0436\u0435\u0442.<br \/>  4. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0432 cookies \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u0432\u0448\u0435\u0433\u043e, \u0442\u043e \u043f\u0440\u0438 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 iframe \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0435 \u043a URL \u0441\u0430\u0439\u0442\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 (\u0430 \u043d\u0435 \u0441\u0430\u0439\u0442\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043d \u0432\u0441\u0442\u0440\u043e\u0435\u043d), \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0442\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \u043e\u043f\u0440\u043e\u0441 \u0432\u0438\u0441\u0438\u0442 \u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0430\u0439\u0442\u0435. \u0427\u0435\u043b\u043e\u0432\u0435\u043a \u0443\u0436\u0435 \u043f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u0432\u0448\u0438\u0439 \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0431\u0443\u0434\u0435\u0442 \u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0430\u0439\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0432\u043e\u0439 \u043e\u0442\u0432\u0435\u0442, \u0430 \u043d\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0437\u0430\u043d\u043e\u0432\u043e.<br \/>  \u0438 \u0442.\u0434.<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u043d\u0435\u0434\u0440\u044f\u0442\u044c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0441\u0430\u0439\u0442\u0430 \u043d\u0430\u0448 \u0432\u0438\u0434\u0436\u0435\u0442. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0432 \u043a\u043e\u0434 \u0437\u0430\u0448\u0438\u0442\u044b \u0434\u0432\u0430 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 (\u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0447\u0442\u0435\u043d\u0438\u044f, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u043a\u0430\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b). \u042d\u0442\u043e <b>widget_container<\/b> \u2014 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u0444\u0440\u0435\u0439\u043c, \u0438 \u0441\u0430\u043c \u0444\u0440\u0435\u0439\u043c <b>widget_iframe<\/b>.<\/p>\n<pre><code class=\"javascript\">function createWidget(config) { \tvar Util = { \t\textendObject: function(a, b) { \t\t\tfor(prop in b){ \t\t\t\ta[prop] = b[prop]; \t\t\t} \t\t\treturn a; \t\t}, \t\tproto: 'https:' == document.location.protocol ? 'https:\/\/' : 'http:\/\/' \t}  \tvar options = Util.extendObject({ \t\tid: 0, \t\tdomain: &quot;example.com&quot;, \t\tbg_color: &quot;FFFFFF&quot; \t}, config);  \toptions.widget_url = [Util.proto, options.domain, &quot;\/?&quot;, &quot;id=&quot;, options.id, &quot;&bg_color=&quot;, options.bg_color].join(&quot;&quot;); \toptions.widget_url += &quot;#&quot; + encodeURIComponent(document.location.href);  \tWidget = { \t\tcreated: false, \t\twidgetElement: null, \t\tshow: function() { \t\t\tif (this.created) \t\t\t\treturn; \t\t\tthis.widgetElement = document.createElement('div'); \t\t\tthis.widgetElement.setAttribute('id', 'widget_container'); \t\t\tthis.widgetElement.innerHTML = ' \\ \t\t\t\t&lt;iframe id=&quot;widget_iframe&quot; src=&quot;' + options.widget_url + '&quot; scrolling=&quot;no&quot; width=&quot;100%&quot; height=&quot;0&quot; frameborder=&quot;0&quot;&gt;&lt;\/iframe&gt;';  \t\t\tdocument.body.insertBefore(this.widgetElement, document.body.nextSibling); \t\t\tthis.widgetElement.style.display = 'block'; \t\t\tthis.created = true; \t\t} \t}  \tXD.receiveMessage(function(message) { \t\tif (message.data &gt; 0 && document.getElementById(&quot;widget_iframe&quot;)) \t\t{ \t\t\tdocument.getElementById(&quot;widget_iframe&quot;).height = message.data; \t\t} \t}, Util.proto + options.domain);  \tWidget.show(); }  createWidget(widgetOptions); <\/code><\/pre>\n<p>  \u0412\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432:<br \/>  <b>Util<\/b> \u2014 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438.<br \/>  <b>Widget<\/b> \u2014 \u0441\u0430\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0432\u0438\u0434\u0436\u0435\u0442\u0430.<br \/>  <b>XD<\/b> \u2014 \u043e\u0431\u044a\u0435\u043a\u0442 \u043a\u0440\u043e\u0441\u0441-\u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u043c\u0435\u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438 (\u0441\u043c. \u0448\u0430\u0433 4, \u043f. 2).<\/p>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u043a\u043e\u0434\u0430, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442 <b>DIV<\/b>, \u043f\u043e\u0442\u043e\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f <b>IFRAME<\/b>, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u044d\u0442\u043e <i>example.com\/?id=0&#038;bg_color=FFFFFF<\/i>). \u0422\u0430\u043a\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439 (\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043e\u0442 \u0444\u0440\u0435\u0439\u043c\u0430), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u0435\u043d\u044f\u0435\u0442 \u0432\u044b\u0441\u043e\u0442\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0430\u0441\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u0442 \u0432\u0438\u0434\u0436\u0435\u0442 \u043f\u043e \u0432\u044b\u0441\u043e\u0442\u0435 \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e.<\/p>\n<h4>\u0428\u0430\u0433 4. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/h4>\n<p>  \u041f\u0440\u0438 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 iframe \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  1. \u0422.\u043a. \u043f\u043e \u0441\u0443\u0442\u0438 \u0432 \u0432\u0438\u0434\u0436\u0435\u0442\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 html-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u0442\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043a\u0430\u043a-\u0442\u043e \u0432 \u043d\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438. \u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c \u0437\u0434\u0435\u0441\u044c \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0442\u0438\u043b\u0438, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u0432 \u0434\u0438\u0437\u0430\u0439\u043d \u0441\u0430\u0439\u0442\u0430-\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044f. \u041c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u2014 \u044d\u0442\u043e widgetOptions.<\/p>\n<pre><code class=\"javascript\">var widgetOptions = { \tid: 1,\t\t\t\/\/ id \u043e\u043f\u0440\u043e\u0441\u0430 \tbg_color: 'FF0000'\t\t\/\/ \u0446\u0432\u0435\u0442 \u0444\u043e\u043d\u0430 }; <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0430, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043d\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442, \u0441\u043e\u0437\u0434\u0430\u044e\u0449\u0438\u0439 \u0432\u0438\u0434\u0436\u0435\u0442:<\/p>\n<pre><code class=\"javascript\">(function() { \tvar script = document.createElement('script'); \tscript.type = 'text\/javascript'; \tscript.async = true; \tscript.src = &quot;http:\/\/example.com\/widget.js&quot;;\t\/\/ \u043f\u0443\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0438\u0437 \u0448\u0430\u0433\u0430 3 \tdocument.getElementsByTagName('head')[0].appendChild(script); })(); <\/code><\/pre>\n<p>  2. \u0415\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0440\u0430\u0441\u0442\u044f\u0433\u0438\u0432\u0430\u043d\u0438\u044f iframe \u043f\u043e \u0432\u044b\u0441\u043e\u0442\u0435 \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u043e\u043b\u043e\u0441 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043e\u043a, \u0430 \u0432\u0441\u0435 \u0441\u043c\u043e\u0442\u0440\u0435\u043b\u043e\u0441\u044c \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u043d\u043e.<\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u0440\u043e\u0441\u0441-\u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u043c\u0435\u043d \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">\/*   * a backwards compatable implementation of postMessage  * by Josh Fraser (joshfraser.com)  * released under the Apache 2.0 license.    *  * this code was adapted from Ben Alman's jQuery postMessage code found at:  * http:\/\/benalman.com\/projects\/jquery-postmessage-plugin\/  *   * other inspiration was taken from Luke Shepard's code for Facebook Connect:  * http:\/\/github.com\/facebook\/connect-js\/blob\/master\/src\/core\/xd.js  *  * the goal of this project was to make a backwards compatable version of postMessage  * without having any dependency on jQuery or the FB Connect libraries  *  * my goal was to keep this as terse as possible since my own purpose was to use this   * as part of a distributed widget where filesize could be sensative.  *   *\/  \/\/ everything is wrapped in the XD function to reduce namespace collisions var XD = function(){        var interval_id,     last_hash,     cache_bust = 1,     attached_callback,     window = this;          return {         postMessage : function(message, target_url, target) {                          if (!target_url) {                  return;              }                  target = target || parent;  \/\/ default to parent                  if (window['postMessage']) {                 \/\/ the browser supports window.postMessage, so call it with a targetOrigin                 \/\/ set appropriately, based on the target_url parameter.                 target['postMessage'](message, target_url.replace( \/([^:]+:\\\/\\\/[^\\\/]+).*\/, '$1'));              } else if (target_url) {                 \/\/ the browser does not support window.postMessage, so set the location                 \/\/ of the target to target_url#message. A bit ugly, but it works! A cache                 \/\/ bust parameter is added to ensure that repeat messages trigger the callback.                 target.location = target_url.replace(\/#.*$\/, '') + '#' + (+new Date) + (cache_bust++) + '&' + message;             }         },            receiveMessage : function(callback, source_origin) {                          \/\/ browser supports window.postMessage             if (window['postMessage']) {                 \/\/ bind the callback to the actual event associated with window.postMessage                 if (callback) {                     attached_callback = function(e) {                         if ((typeof source_origin === 'string' && e.origin !== source_origin)                         || (Object.prototype.toString.call(source_origin) === &quot;[object Function]&quot; && source_origin(e.origin) === !1)) {                             return !1;                         }                         callback(e);                     };                 }                 if (window['addEventListener']) {                     window[callback ? 'addEventListener' : 'removeEventListener']('message', attached_callback, !1);                 } else {                     window[callback ? 'attachEvent' : 'detachEvent']('onmessage', attached_callback);                 }             } else {                 \/\/ a polling loop is started & callback is called whenever the location.hash changes                 interval_id && clearInterval(interval_id);                 interval_id = null;                  if (callback) {                     interval_id = setInterval(function(){                         var hash = document.location.hash,                         re = \/^#?\\d+&\/;                         if (hash !== last_hash && re.test(hash)) {                             last_hash = hash;                             callback({data: hash.replace(re, '')});                         }                     }, 100);                 }             }            }     }; }(); <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0418\u0437 \u0444\u0440\u0435\u0439\u043c\u0430 \u0441 \u043d\u0430\u0448\u0438\u043c \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u0432\u044b\u0441\u043e\u0442\u0443 (\u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043e\u043a\u043d\u0430) \u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u043e\u043a\u043d\u043e. \u0421\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0441 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438 \u0440\u0430\u0441\u0442\u044f\u0433\u0438\u0432\u0430\u0442\u044c \u043e\u043a\u043d\u043e \u0441 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u043c \u043f\u043e \u0432\u044b\u0441\u043e\u0442\u0435 \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e.<\/p>\n<pre><code class=\"html\">&lt;body onresize=&quot;resize_canvas()&quot;&gt; \t&lt;script type=&quot;text\/javascript&quot;&gt; \t\tvar parent_url = decodeURIComponent(document.location.hash.replace(\/^#\/, '')); \t\tfunction send(msg) { \t\t\tXD.postMessage(msg, parent_url, parent); \t\t} \t\tfunction resize_canvas() { \t\t\tsend($('body').height()); \t\t} \t&lt;\/script&gt; &lt;\/body&gt; <\/code><\/pre>\n<p>  <\/p>\n<h4>\u0428\u0430\u0433 5. \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u0440\u0435\u043b\u0438\u0437<\/h4>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043d\u0430\u0448 \u0432\u0438\u0434\u0436\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u043d, \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u0442\u043e\u043d\u043e\u043c \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c javascript \u043a\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u0441\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0430\u0439\u0442\u0430-\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u0430.<br \/>  \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 <a href=\"http:\/\/habrahabr.ru\/post\/74438\/\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f Javascript \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Google Closure Compiler<\/a>.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u0438\u0435 \u0441\u0430\u0439\u0442\u044b, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u0442\u044c https \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c, \u0432\u044b\u0431\u0440\u0430\u0432\u0448\u0438\u043c \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435, \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0438 \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430.<br \/>  \u0412 \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u0443\u0442\u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"javascript\">script.src = (document.location.protocol == &quot;https:&quot; ? &quot;https:&quot; : &quot;http:&quot;) + &quot;\/\/example.com\/widget.js&quot;; <\/code><\/pre>\n<p>  <\/p>\n<h4>P.S.<\/h4>\n<p>  \u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043d\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u043c\u043e\u0433\u0443 \u0438\u0445 \u0432\u044b\u043b\u043e\u0436\u0438\u0442\u044c. \u0415\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0441\u043e\u0431\u0435\u0440\u0435\u0442 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0437\u0430\u0445\u043e\u0447\u0435\u0442 \u0438\u043c \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u2014 wellcome!    \t \t\t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/169909\/\"> http:\/\/habrahabr.ru\/post\/169909\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">\n<blockquote><p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441 \u043d\u0443\u043b\u044f \u0432\u0438\u0434\u0436\u0435\u0442 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u0430 (\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u043e\u043f\u0440\u043e\u0441\u043e\u0432). \u0422.\u043a. \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0442\u0435\u043c\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u0430, \u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u043e\u043f\u0440\u043e\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u043e.<\/p><\/blockquote>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/b6d\/020\/262\/b6d020262be2cfbb84a5f56eb16aa48f.png\"\/>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-169909","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/169909","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=169909"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/169909\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=169909"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=169909"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=169909"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}