Skip to content

Instantly share code, notes, and snippets.

View StephaneTy-Pro's full-sized avatar

StephaneTy-Pro

  • France - Northern France - Lille/Tourcoing
View GitHub Profile
@StephaneTy-Pro
StephaneTy-Pro / fireEvent
Created June 2, 2015 12:33
Javasript FireEvent
// from http://www.cristinawithout.com/content/function-trigger-events-javascript
//It takes 2 parameters:
//obj - the object to trigger the event on
// evt - the name of the event to trigger (as a string)
function fireEvent(obj, evt){
var fireOnThis = obj;
if( document.createEvent ) {
var evObj = document.createEvent('MouseEvents');
@StephaneTy-Pro
StephaneTy-Pro / fill_form.js
Last active August 29, 2015 14:22
A form filler (for testing purpose)
(function( window ) {
var document = window.document,
fieldValueMap = {
'addressName' : 'Mon Adresse'
//, 'owner_counrty' : 'France'
, 'city' : 'Lille'
, 'postalCode' : '59000'
, 'addressLine4' : 'Bâtiment ou étage'
, 'owner_further_address_details' : 'Compl. Adresse' // id
//, 'owner_further_moving_date_month' : '01'
REM placer ce fichier à l'emplacement suivant
REM Windows 8
REM C:\Users\nom d’utilisateur\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
REM Windows 7/vista
REM C:\Utilisateurs\nom d’utilisateur\AppData\Roaming\Microsoft\Windows\Menu Démarrer\Programmes\Démarrage
ECHO | DEL /F /S /Q /A C:\Windows\TEMP\*.*
ECHO | DEL /F /S /Q /A "C:\Users\%username%\Appdata\Local\Temp\*-*"
@StephaneTy-Pro
StephaneTy-Pro / 0_reuse_code.js
Last active August 29, 2015 14:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console