tor-browser

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

sources-tree.js (996B)


      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 
      5 import { getMainThread } from "../selectors/index";
      6 
      7 export function setExpandedState(expanded) {
      8  return { type: "SET_EXPANDED_STATE", expanded };
      9 }
     10 
     11 export function focusItem(item) {
     12  return { type: "SET_FOCUSED_SOURCE_ITEM", item };
     13 }
     14 
     15 export function setProjectDirectoryRoot(
     16  newRootItemUniquePath,
     17  newName,
     18  newFullName
     19 ) {
     20  return ({ dispatch, getState }) => {
     21    dispatch({
     22      type: "SET_PROJECT_DIRECTORY_ROOT",
     23      uniquePath: newRootItemUniquePath,
     24      name: newName,
     25      fullName: newFullName,
     26      mainThread: getMainThread(getState()),
     27    });
     28  };
     29 }
     30 
     31 export function clearProjectDirectoryRoot() {
     32  return setProjectDirectoryRoot("", "", "");
     33 }
     34 
     35 export function setShowContentScripts(shouldShow) {
     36  return { type: "SHOW_CONTENT_SCRIPTS", shouldShow };
     37 }