среда, 22 мая 2013 г.

detect adobe flash

var hasFlash = false;
try {
  var fo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
  if(fo) hasFlash = true;
}catch(e){
  if(navigator.mimeTypes["application/x-shockwave-flash"] != undefined) hasFlash = true;
}


got it from here

суббота, 18 мая 2013 г.

add "Open With" in contex menu win7

regedit.exe -> HKEY_CLASSES_ROOT\*\shell->"create a new key"->create a new key below called “command”->edit default val with "notepad.exe %1"

For non admins:
  1. Using Regedit, navigate to HKEY_CURRENT_USER\Software\Classes
  2. If a key "*" is present under software\Classes skip the next step 
  3. Right click on Classes and choose "New->Key". Name the new key "*"
  4. If a key "shell"  is present under Software\Classes\*  skip the next step 
  5. Right click on "*" and choose "New->Key". Name the new key "shell"
  6. Right-click on shell and choose "New->Key". Name the new key "Edit with Notepad++" (without quotes)
  7. Right-click on  "Edit with Notepad++" and choose "New->Key". Name the key as "command"
  8. Now select "command" and navigate to the right pane
  9. Double click "Default" in the right pane 
  10. Enter a value "C:\MyBin\Notepad++\Notepad++.exe "%1"" (without the outer quotes)
 got it from here