tag:blogger.com,1999:blog-88011655486111016832024-02-21T05:57:29.782-05:00Tighe Lory's BlogTighe Lory comments on things that interest, inspire, anger, and enrage him. Subjects covered include The Transformers, Grave Digger, Japan, Anime, Fansubs, Politics, Ideas, Food, Etc.Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.comBlogger184125tag:blogger.com,1999:blog-8801165548611101683.post-31074640951242959612013-08-15T12:49:00.001-04:002013-08-15T12:50:10.823-04:00Dynamic Javascript based on CSS Media Queries<p>I am working on a project where I have to run different Javascript code determined on CSS Media queries. There is no built in way for doing this so I came up with this example.</p>
<p>I created two <div> tags, one with an ID of 'landscape' and another with an ID of 'portrait'. The CSS sets display:none; one and display:block; on the other depending on if the screen is in landscape or portrait mode.</p>
<p>When you click on the link in the example I use jQuery (you could use just Javascript) to check to see which of the two IDs are display:block. The function then returns the orientation value which is used as a dynamic object name and runs the version of the function that is for the current orientation, portrait or landscape.</p>
<p>This was a simple proof of concept, the real version I will be using will have multiple modes of display, phone, tablet(landscape), tablet(portrait) and desktop. This allows me to write all my functions and keep them in one object for each mode of display!</p>
<h2>Example</h2>
<p><a href="http://me.tighelory.com/responsive_javascript_example.html">Example Page</a></li>
<h2>Code</h2>
<code style="white-space:pre!important; background:white; color:#666; font-family:mono; font-size:12px; display:block; border:solid 1px #999; width:600px; height:400px; overflow-y:scroll;"><!DOCTYPE html>
<html lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Responsive Javascript Example</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<style type="text/css">
<!--
@media only screen and (orientation:portrait)
{
html
{
background:white;
color:black;
}
#portrait
{
display:block;
color:red;
}
#landscape
{
display:none;
color:red;
}
}
@media only screen and (orientation:landscape)
{
html
{
background:black;
color:white;
}
#portrait
{
display:none;
color:green;
}
#landscape
{
display:block;
color:green;
}
}
-->
</style>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/ecmascript">
/* <![CDATA[ */
jQuery.noConflict();
var landscape = {};
var portrait = {};
function orientation()
{
if (jQuery("#portrait").css('display') == 'block')
{
return 'portrait';
}
if (jQuery("#landscape").css('display') == 'block')
{
return 'landscape';
}
return 'unknown';
}
window.addEventListener("load",
function()
{
jQuery("a.layoutcheck").click(function(){window[orientation()].talk(); return false;});
});
landscape.talk = function()
{
alert('landscape');
}
portrait.talk = function()
{
alert('portrait');
}
/* ]]> */
</script>
</head>
<body>
<h1>Responsive Javascript Example</h1>
<p><a class="layoutcheck" href="">Click to check layout</a></p>
<div id="landscape">Landscape</div>
<div id="portrait">Portrait</div>
</body>
</html>
</code>
Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0tag:blogger.com,1999:blog-8801165548611101683.post-44996592487307128632013-07-11T15:00:00.001-04:002013-07-11T15:01:47.702-04:00New Tool: Tenma Hot Air SMD Rework Station<iframe allowfullscreen="" frameborder="0" width="600" height="338" src="//www.youtube.com/embed/ZSnVAJdYNX0" ></iframe>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0tag:blogger.com,1999:blog-8801165548611101683.post-80470614972110922472013-07-03T15:03:00.000-04:002013-07-11T15:06:01.535-04:00Soul Edge and Psychic Force (サイキックフォース) Picked up for Cheap!<iframe allowfullscreen="" frameborder="0" height="338" src="//www.youtube.com/embed/7EuUke_nwng" width="600"></iframe>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0tag:blogger.com,1999:blog-8801165548611101683.post-61804124545246917482013-06-30T15:05:00.000-04:002013-07-11T15:05:41.793-04:00Virtual Boy Arcade Cabinet: Precutting Formica Technique<iframe allowfullscreen="" frameborder="0" height="338" src="//www.youtube.com/embed/Kj0pVfiE-3c" width="600"></iframe>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0tag:blogger.com,1999:blog-8801165548611101683.post-54587513512374100142013-06-05T15:07:00.000-04:002013-07-11T15:07:33.510-04:00CrazyKongFan's Donkey Kong Junior that was Converted to Mario Bros<iframe allowfullscreen="" frameborder="0" height="338" src="//www.youtube.com/embed/g7WtVglrC34" width="600"></iframe>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0tag:blogger.com,1999:blog-8801165548611101683.post-59147250365788103372012-10-11T16:02:00.000-04:002012-12-13T16:05:33.989-05:00Installing a Braze High Score Save in my Donkey Kong Junior Arcade Game<iframe width="600" height="338" src="http://www.youtube.com/embed/kQvmJCUhakI" frameborder="0" allowfullscreen></iframe>
<p>This is a great kit that adds freeplay and high score saving to a Donkey Kong Junior arcade game</p>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0tag:blogger.com,1999:blog-8801165548611101683.post-42827908577412811532012-09-27T16:01:00.000-04:002012-12-13T16:01:46.415-05:00Restoration of my Donkey Kong Junior is complete<iframe width="600" height="338" src="http://www.youtube.com/embed/pw8DUs0MBkI" frameborder="0" allowfullscreen></iframe>
<p>Here is the final result. I still have a few minor things to do.</p>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0tag:blogger.com,1999:blog-8801165548611101683.post-18891154008871131862012-09-27T15:59:00.000-04:002012-12-13T16:00:57.132-05:00Applying Side Art to a Donkey Kong Junior<iframe width="600" height="338" src="http://www.youtube.com/embed/YN_6IACYcqc" frameborder="0" allowfullscreen></iframe>
<p>I picked up second reproduction quality side art for my Donkey Kong Junior, it turned out really nice!</p>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0tag:blogger.com,1999:blog-8801165548611101683.post-15973026171859784702012-09-27T15:56:00.000-04:002012-12-13T15:57:57.007-05:00Installing a Donkey Kong Junior Monitor Cap Kit ( Sanyo 20EZ )<iframe width="600" height="338" src="http://www.youtube.com/embed/ytCSLfk3DU4" frameborder="0" allowfullscreen></iframe>
<p>Here you can see how replaced all capacitors in my Donkey Kong Junior (Sanyo 20EZ Monitor)</p>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0tag:blogger.com,1999:blog-8801165548611101683.post-799617088962768172012-08-12T15:54:00.000-04:002012-12-13T15:58:21.391-05:00Midway's Space Encounters Star Wars crossed with Space Invaders<iframe width="600" height="338" src="http://www.youtube.com/embed/TI4cEQF724A" frameborder="0" allowfullscreen></iframe>
<p>I was able to play this rare game at a local arcade collector's party. It is really cool, makes me think of Star Wars crossed with Space Invaders!</p>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0tag:blogger.com,1999:blog-8801165548611101683.post-62173647280343110462012-08-11T11:00:00.000-04:002012-08-13T10:37:50.463-04:00Rolling Console Video Game Table for the Basement Arcade<iframe width="600" height="338" src="http://www.youtube.com/embed/PZP3ZG0fuYQ?rel=0" frameborder="0" allowfullscreen></iframe>
<p>I made this table on casters with a 36" height surface to match with my basment arcade. Previously the consoles were in the way and didn't fit in.</p>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0507 Ploss Rd, Richmondville, NY 12149, USA42.638818 -74.53956542.637358 -74.542032499999991 42.640278 -74.5370975tag:blogger.com,1999:blog-8801165548611101683.post-5689607605747070182012-08-04T17:00:00.000-04:002012-08-13T10:37:15.233-04:00Midway's Space Encounters Star Wars crossed with Space Invaders<iframe width="600" height="338" src="http://www.youtube.com/embed/TI4cEQF724A?rel=0" frameborder="0" allowfullscreen></iframe>
<p>I was able to play this rare game at a local arcade collector's party. It is really cool, makes me think of Star Wars crossed with Space Invaders!</p>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0Johnson City, NY, USA42.1156308 -75.958809242.0685163 -76.0377732 42.1627453 -75.8798452tag:blogger.com,1999:blog-8801165548611101683.post-31570676942761383562012-08-02T16:00:00.000-04:002012-08-13T10:37:58.051-04:00Sea Wolf: The Next Mission<iframe width="600" height="338" src="http://www.youtube.com/embed/oqk6_C2zIMA?rel=0" frameborder="0" allowfullscreen></iframe>
<p>This is a modern sequel to Sea Wolf and Sea Wolf 2. I was able to play this in the Chuck E Cheese in New Hartford, NY</p>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com04619-4637 Commercial Dr, New Hartford, NY 13413, USA43.0874198 -75.313622143.0859703 -75.3160896 43.0888693 -75.311154600000009tag:blogger.com,1999:blog-8801165548611101683.post-4181942136168604012012-08-02T11:00:00.000-04:002012-08-13T10:38:02.789-04:00Cool Store: Mancave Artifacts in Richfield Springs, NY<iframe width="600" height="338" src="http://www.youtube.com/embed/LAYZik5dPyo?rel=0" frameborder="0" allowfullscreen></iframe>
<p>I happened to pass by this store on my vacation and I pulled over and shot some video. It was closed at the time, but the store is very cool!</p>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0140 Main St, Richfield Springs, NY 13439, USA42.853281 -74.98549842.851826 -74.9879655 42.854736 -74.983030500000012tag:blogger.com,1999:blog-8801165548611101683.post-65545974189167245852012-07-30T15:00:00.000-04:002012-08-13T10:38:10.279-04:00Funspot Arcade: 30 Minutes Unedited Footage From My Visit<iframe width="600" height="338" src="http://www.youtube.com/embed/71PvWRD1avg?rel=0" frameborder="0" allowfullscreen></iframe>
<p>I took the whole family to Funspot this Monday (July 30, 2012) This is unedited video from the visit.</p>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com1587-643 Daniel Webster Hwy, Laconia, NH 03246, USA43.6133329 -71.477780343.6118959 -71.4802478 43.614769900000006 -71.475312800000012tag:blogger.com,1999:blog-8801165548611101683.post-85423677086897395342012-07-27T17:00:00.000-04:002012-08-13T10:25:10.280-04:00Car Tip: Cool Your Beverages<iframe width="600" height="450" src="http://www.youtube.com/embed/ZhHSdIlMoz0?rel=0" frameborder="0" allowfullscreen></iframe>
<p>If you have a Saturn SL like me you can use this tip to cool your beverage!</p>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0tag:blogger.com,1999:blog-8801165548611101683.post-28803212177706987822012-07-04T10:58:00.001-04:002012-07-18T12:20:10.804-04:00Goodbye Virtual Boy Arcade Cabinet<iframe allowfullscreen="" frameborder="0" height="338" src="http://www.youtube.com/embed/EDHtZ-zBEDk" width="600"></iframe>
<p>
Well, I never thought I would do it, but when the opportunity to buy a Star Trek: The Next Generation Pinball machine presented itself I decided that I would sell the Virtual Boy so that I could get it. Thanks to Nathan Barnatt (AKA Keith Apicary <a href="http://www.youtube.com/talkingclassics">http://www.youtube.com/talkingclassics</a> & <a href="http://www.youtube.com/user/nathanjbarnatt">http://www.youtube.com/user/nathanjbarnatt</a>) for buying the Virtual Boy and making my dream of owning this pinball come true!</p>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0tag:blogger.com,1999:blog-8801165548611101683.post-55541582506895087672012-06-25T15:41:00.000-04:002012-07-19T15:42:34.401-04:00Capcom's Ghost 'n Goblins (Arcade Bootleg)<iframe width="600" height="338" src="http://www.youtube.com/embed/RXZqvjaJ7lE?rel=0" frameborder="0" allowfullscreen></iframe>
<p>I recently picked up this cool bootleg of Ghosts 'n Goblins. This is the same as Capcom's version, just some bootleggers copied the hardware and ROMs and sold this cheaper to arcade operators back in the 1980's.</p>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0tag:blogger.com,1999:blog-8801165548611101683.post-41587461351437575342012-06-25T00:00:00.000-04:002012-07-19T15:44:30.447-04:00Latest Arcade Game Pickup: Sega's Super Hang On<iframe width="600" height="338" src="http://www.youtube.com/embed/YSuIv3NJmYI?rel=0" frameborder="0" allowfullscreen></iframe>
<p>I picked this up just the other day, it needs a lot of cleaning and tuning, but it is a nice solid game.</p>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0507 Ploss Rd, Richmondville, NY 12149, USA42.638818 -74.53956542.637358 -74.542032499999991 42.640278 -74.5370975tag:blogger.com,1999:blog-8801165548611101683.post-56109427640432789712012-06-09T15:45:00.000-04:002012-07-19T15:46:11.102-04:00Custom Arcade Cabinet - Cutting Formica with a Flush Trim Bit on a Router<iframe width="600" height="338" src="http://www.youtube.com/embed/L2VECSepbAw?rel=0" frameborder="0" allowfullscreen></iframe>
<p>I am making a custom Nintendo style arcade cabinet, and I am using Formica for the sides.</p>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0tag:blogger.com,1999:blog-8801165548611101683.post-46781053380150287262012-06-07T15:47:00.000-04:002012-07-19T15:48:06.991-04:00Marvel Vs. Capcom CPS2 converted to Hyper Street Fighter 2 Anniversary Edition<iframe width="600" height="338" src="http://www.youtube.com/embed/ajYeTXS4E34?rel=0" frameborder="0" allowfullscreen></iframe>
<p>So I had an extra suicided Marvel Vs. Capcom and rather than just have it phoenixed I had it converted to Hyper Street Fighter 2 Anniversary Edition</p>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0507 Ploss Rd, Richmondville, NY 12149, USA42.638818 -74.53956542.637358 -74.542032499999991 42.640278 -74.5370975tag:blogger.com,1999:blog-8801165548611101683.post-1885468081476217302012-06-05T15:48:00.000-04:002012-07-19T15:49:44.906-04:00JAMMA Ms. Pac-Man Champion Edition & Super Zola Pac Gal<iframe width="600" height="338" src="http://www.youtube.com/embed/Hma2RKd100M?rel=0" frameborder="0" allowfullscreen></iframe>
<p>This is a really neat JAMMA board from the 90's with Ms. Pac-Man Championship Edition and Super Zola Pac Gal on it. Both have a timer you have to clear the stage in and are in turbo mode. Thanks CrazyKongFan for bringing it along!</p>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0507 Ploss Rd, Richmondville, NY 12149, USA42.638818 -74.53956542.637358 -74.542032499999991 42.640278 -74.5370975tag:blogger.com,1999:blog-8801165548611101683.post-60352053260891508802012-06-05T00:00:00.000-04:002012-07-19T15:51:19.085-04:00CrazyKongFan plays Gaplus - Amazing<iframe width="600" height="338" src="http://www.youtube.com/embed/HFbb7cHOfsg?rel=0" frameborder="0" allowfullscreen></iframe>
<p>Thanks to CrazyKongFan for stopping by again on his way to FunSpot, watching him play Gaplus is always amazing, even with my flaky right fire button. I need to fix that.</p>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0507 Ploss Rd, Richmondville, NY 12149, USA42.638818 -74.53956542.637358 -74.542032499999991 42.640278 -74.5370975tag:blogger.com,1999:blog-8801165548611101683.post-3234814752843784902012-06-01T15:52:00.000-04:002012-07-19T15:53:08.254-04:00Guilty Gear X for my Sega Naomi Arcade Cabinet<iframe width="600" height="338" src="http://www.youtube.com/embed/h0GFgHnpmYM?rel=0" frameborder="0" allowfullscreen></iframe>
<p>Fun game, pick one up for your Naomi.</p>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0507 Ploss Rd, Richmondville, NY 12149, USA42.638818 -74.53956542.637358 -74.542032499999991 42.640278 -74.5370975tag:blogger.com,1999:blog-8801165548611101683.post-57420424608029130832012-05-30T09:48:00.003-04:002012-05-30T09:48:54.736-04:00Made a JAMMA Adapter for my Space Invaders Part II cabinet (Big Kong) for 60-in-1 board<iframe width="600" height="337" src="http://www.youtube.com/embed/V9yb-IenS0o" frameborder="0" allowfullscreen></iframe>
<p>I decided to make a JAMMA adapter so I could use a 60-in-1 multiboard in my Space Invaders Part II cocktail arcade game. It currently has Crazy Kong bootleg board in it called Big Kong. I am not getting rid of that.</p>Tighe Loryhttp://www.blogger.com/profile/09637298437238958865noreply@blogger.com0