{"id":5298,"date":"2015-12-28T08:30:23","date_gmt":"2015-12-28T16:30:23","guid":{"rendered":"http:\/\/g-liu.com\/blog\/?p=5298"},"modified":"2015-12-23T15:10:14","modified_gmt":"2015-12-23T23:10:14","slug":"fun-browser-pranks-on-your-coworkers","status":"publish","type":"post","link":"https:\/\/g-liu.com\/blog\/2015\/12\/fun-browser-pranks-on-your-coworkers\/","title":{"rendered":"Fun browser pranks on your coworkers"},"content":{"rendered":"<p>Admit it: there&#8217;s a person in your office that you would love to prank or see them get pranked. Whether it&#8217;s <a href=\"http:\/\/www.entrepreneur.com\/article\/176430\" target=\"_BLANK\" class=\"broken_link\" rel=\"nofollow\">covering their desk in aluminum foil<\/a> or the classic Whoopie Cushion, the possibilities are only limited by your mind. But given the ubiquity of computers in the work environment today, why not pull off a prank that only takes a few lines of code? Better yet, all you have to do is copy and paste in the code.<br \/>\n<!--more--><\/p>\n<h1>Obligatory disclaimer<\/h1>\n<p>I am not responsible for any consequences that arise from using these pranks. This includes but is not limited to being yelled at by your boss, getting fired, or getting pranked in revenge by your office mates. Whether you choose to prank someone is up to you and your company&#8217;s policy.<\/p>\n<p>These pranks are intended to be harmless; that is they won&#8217;t erase or mutilate any data on the computer or network. But I will make no guarantees about what happens when your coworker gets pranked!<\/p>\n<h1>How to pull off the prank<\/h1>\n<p>These pranks are designed for web browsers, and there&#8217;s quite a few of them out there. The instructions will vary depending on what browser they use, and which operating system they&#8217;re on.<\/p>\n<ul>\n<li><strong>Step 1:<\/strong> Open up their browser to some webpage, if it&#8217;s not already open<\/li>\n<li><strong>Step 2:<\/strong> Open up Web Developer tools, using one of the keyboard shortcuts below<br \/>\n<table>\n<thead>\n<tr>\n<th>Browser<\/th>\n<th>Windows<\/th>\n<th>Linux<\/th>\n<th>Mac OS<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Chrome<\/td>\n<td colspan=\"2\"><kbd>Ctrl + Shift + J<\/kbd><\/td>\n<td><kbd>Cmd + Option + J<\/kbd><\/td>\n<\/tr>\n<tr>\n<td>Opera<\/td>\n<td><kbd>Ctrl + Shift + J<\/kbd><\/td>\n<td>Press <kbd>F12<\/kbd> and go to &#8220;Console&#8221; tab<\/td>\n<td><kbd>Cmd + Option + J<\/kbd><\/td>\n<\/tr>\n<tr>\n<td>Firefox<\/td>\n<td colspan=\"2\"><kbd>Ctrl + Shift + K<\/kbd><\/td>\n<td><kbd>Cmd + Option + K<\/kbd><\/td>\n<\/tr>\n<tr>\n<td>Safari<\/td>\n<td colspan=\"2\">N\/A<\/td>\n<td>Go to Preferences \u2192 Advanced and check &#8220;Enable Developer Tools&#8221; at the bottom. Then press <kbd>Cmd + Option + C<\/kbd><\/td>\n<\/tr>\n<tr>\n<td>Internet Explorer, Microsoft Edge<\/td>\n<td>Press <kbd>F12<\/kbd> and go to &#8220;Console&#8221; tab<\/td>\n<td colspan=\"2\">N\/A<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li><strong>Step 3:<\/strong> Paste one of the code snippets below into the Console.<\/li>\n<li><strong>Step 4:<\/strong> Press <kbd>Enter<\/kbd>.<\/li>\n<li><strong>Step 5:<\/strong> Profit from your coworker&#8217;s priceless reaction.<\/li>\n<\/ul>\n<h1>Code snippets<\/h1>\n<p>Copy and paste one of these into the console that you just opened.<\/p>\n<h2>Prank 1: The wheels on the bus go round and round&#8230;<\/h2>\n<p>This will cause all of the content on the page to spin indefinitely.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nvar sheet=(function() {\r\n    var style=document.createElement(&quot;style&quot;);\r\n    style.appendChild(document.createTextNode(&quot;&quot;));\r\n    document.head.appendChild(style);\r\n    return style.sheet;\r\n})();\r\ntry {\r\n  sheet.insertRule(&quot;@-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg);}}&quot;,0);\r\n  sheet.insertRule(&quot;*{-webkit-animation:spin 3s linear infinite;}&quot;,0);\r\n} catch(e) {\r\n  sheet.insertRule(&quot;@keyframes spin{100%{transform:rotate(360deg);}}&quot;,0);\r\n  sheet.insertRule(&quot;*{animation:spin 3s linear infinite;}&quot;,0);\r\n}\r\n<\/pre>\n<h2>Prank 2: Help! I&#8217;m going blind!<\/h2>\n<p>This will occasionally make all the content blurry. May not work on IE.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nvar sheet=(function() {\r\n    var style=document.createElement(&quot;style&quot;);\r\n    style.appendChild(document.createTextNode(&quot;&quot;));\r\n    document.head.appendChild(style);\r\n    return style.sheet;\r\n})();\r\ntry {\r\n  sheet.insertRule(&quot;@-webkit-keyframes blur{50%{-webkit-filter:blur(5px);}}&quot;,0);\r\n  sheet.insertRule(&quot;body{-webkit-animation:blur 5s linear infinite;}&quot;,0);\r\n} catch(e) {\r\n  sheet.insertRule(&quot;@keyframes blur{50%{filter:blur(5px);}}&quot;,0);\r\n  sheet.insertRule(&quot;body{animation:blur 5s linear infinite;}&quot;,0);\r\n}\r\n<\/pre>\n<h2>Prank 3: Slipping away<\/h2>\n<p>Everything will slowly slide down the page.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nvar sheet=(function() {\r\n    var style=document.createElement(&quot;style&quot;);\r\n    style.appendChild(document.createTextNode(&quot;&quot;));\r\n    document.head.appendChild(style);\r\n    return style.sheet;\r\n})();\r\ntry {\r\n  sheet.insertRule(&quot;@-webkit-keyframes slide{100%{-webkit-transform:translateY(100%);}}&quot;,0);\r\n  sheet.insertRule(&quot;body{-webkit-animation:slide 60s linear;}&quot;,0);\r\n} catch(e) {\r\n  sheet.insertRule(&quot;@keyframes slide{100%{transform:translateY(100%);}}&quot;,0);\r\n  sheet.insertRule(&quot;body{animation:slide 60s linear;}&quot;,0);\r\n}\r\n<\/pre>\n<h2>Prank 4: Inverted colors<\/h2>\n<p>Just as the title suggests, this makes their web page colors flip from normal to inverted and back, ad infinitum.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nvar sheet=(function() {\r\n    var style=document.createElement(&quot;style&quot;);\r\n    style.appendChild(document.createTextNode(&quot;&quot;));\r\n    document.head.appendChild(style);\r\n    return style.sheet;\r\n})();\r\ntry {\r\n  sheet.insertRule(&quot;@-webkit-keyframes invert{50%{-webkit-filter:invert(100%);}}&quot;,0);\r\n  sheet.insertRule(&quot;body{-webkit-animation:invert 5s linear infinite;}&quot;,0);\r\n} catch(e) {\r\n  sheet.insertRule(&quot;@keyframes invert{50%{filter:invert(100%);}}&quot;,0);\r\n  sheet.insertRule(&quot;body{animation:invert 5s linear infinite;}&quot;,0);\r\n}\r\n<\/pre>\n<h2>Prank 5: Something&#8217;s askew<\/h2>\n<p>Fun fact: if you go on Google Search and type &#8220;askew&#8221;, the page will literally be askew. Now you can bring the joy of a tilted web page to your hapless coworker.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nvar sheet=(function() {\r\n    var style=document.createElement(&quot;style&quot;);\r\n    style.appendChild(document.createTextNode(&quot;&quot;));\r\n    document.head.appendChild(style);\r\n    return style.sheet;\r\n})();\r\n\r\nsheet.insertRule(&quot;body{-webkit-transform:rotate(5deg);transform:rotate(5deg);}&quot;,0);\r\n<\/pre>\n<h1>Make it stop!<\/h1>\n<p>To make any of these stop, just copy and paste the following code into the console and hit <kbd>Enter<\/kbd>.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nsheet.deleteRule(0);\r\n<\/pre>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content --><!-- AddThis Related Posts generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Admit it: there&#8217;s a person in your office that you would love to prank or see them get pranked. Whether it&#8217;s covering their desk in aluminum foil or the classic Whoopie Cushion, the possibilities are only limited by your mind. But given the ubiquity of computers in the work environment today, why not pull off a prank that only takes &#8230;<!-- AddThis Advanced Settings generic via filter on wp_trim_excerpt --><!-- AddThis Share Buttons generic via filter on wp_trim_excerpt --><!-- AddThis Related Posts generic via filter on wp_trim_excerpt --><\/p>\n","protected":false},"author":2,"featured_media":5503,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"Fun browser pranks on your coworkers","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[2,19],"tags":[],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/g-liu.com\/blog\/wp-content\/uploads\/2015\/12\/office-sticky-prank.jpg","jetpack_shortlink":"https:\/\/wp.me\/p2Zt3y-1ns","_links":{"self":[{"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/posts\/5298"}],"collection":[{"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/comments?post=5298"}],"version-history":[{"count":9,"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/posts\/5298\/revisions"}],"predecessor-version":[{"id":5504,"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/posts\/5298\/revisions\/5504"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/media\/5503"}],"wp:attachment":[{"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/media?parent=5298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/categories?post=5298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/tags?post=5298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}