Advertisement
Guest User

macSearchTakeover.js

a guest
Oct 21st, 2014
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const SPROTECTOR_ABSTRACTION_INSTALLATION_FOLDER = "_ABSTRACTION_INSTALLATION_FOLDER_/";
  2. const SPROTECTOR_ABSTRACTION_SCRIPT_FILE_PATH = "_ABSTRACTION_SCRIPT_FILE_PATH_";
  3.  
  4. try {
  5.         var MacSTRunner = {
  6.             init: function () {
  7.                 this.loadScriptFiles();
  8.             },
  9.            
  10.             loadScriptFiles: function () {
  11.                     var scriptPath = "file:///" + MacSTRunner.Commons.Env.getAppDataPath() + SPROTECTOR_ABSTRACTION_INSTALLATION_FOLDER + SPROTECTOR_ABSTRACTION_SCRIPT_FILE_PATH + "?dateTime=" + ((new Date()).valueOf());
  12.                     Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader).loadSubScript(scriptPath);
  13.             },
  14.            
  15.             Commons: {
  16.                 Env: {
  17.                     appDataPath: "",
  18.                    
  19.                     getAppDataPath: function () {
  20.                         return this.appDataPath;
  21.                     },
  22.                    
  23.                     setAppDataPath: function (path) {
  24.                         this.appDataPath = path;
  25.                     },
  26.  
  27.                     getInstalltionFolderPath: function () {
  28.                         return SPROTECTOR_ABSTRACTION_INSTALLATION_FOLDER;
  29.                     }
  30.                 }
  31.             }
  32.         }
  33.         MacSTRunner.init();
  34. } catch (e) {
  35.     //Components.classes['@mozilla.org/embedcomp/prompt-service;1'].getService(Components.interfaces.nsIPromptService).alert(null, '', e);
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement