dlupu / fvd_utils

// ==UserScript==
// @name     fvd_utils
// @description utils 
// @version  5
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js
// @include /^https://.*-des\.f.v..d\.com//
// @license MIT
// ==/UserScript==
// ==OpenUserJS==
// @author dlupu
// @collaborator clambert
// @collaborator ford.lambert 
// ==/OpenUserJS==

ConsoleHelper = {
  on: false,
  log: function (whatever) {
    if (this.on) {
      console.log(whatever);
    }
  }
};

// Helper to get the CSRF Token from the designer page
RailsCsrfToken = {
  get: function () {
    return jQuery('meta[name=csrf-token]').attr('content')
  }
};

FvdDesHelper = {
  projectSid: function () {
    return window.location.hostname.match(/(.*)-des\.f.v..d\.com/)[1]
  }
};