tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

targets.js (803B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
      4 "use strict";
      5 
      6 function registerTarget(targetFront) {
      7  return { type: "REGISTER_TARGET", targetFront };
      8 }
      9 
     10 function unregisterTarget(targetFront) {
     11  return { type: "UNREGISTER_TARGET", targetFront };
     12 }
     13 
     14 /**
     15 *
     16 * @param {string} targetActorID: The actorID of the target we want to select.
     17 */
     18 function selectTarget(targetActorID) {
     19  return function ({ dispatch }) {
     20    dispatch({ type: "SELECT_TARGET", targetActorID });
     21  };
     22 }
     23 
     24 function refreshTargets() {
     25  return { type: "REFRESH_TARGETS" };
     26 }
     27 
     28 module.exports = {
     29  registerTarget,
     30  unregisterTarget,
     31  selectTarget,
     32  refreshTargets,
     33 };