How to use the network.getSearchParam function in network

To help you get started, we’ve selected a few network examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github raindropio / extensions / src / routes / start.jsx View on Github external
componentWillMount() {
		var isModal = (network.getSearchParam('modal') ? true : false);
		var initApp = ()=>{
			this.login()
			this.bookmark()
		}

		if ((__APPBUILD__)||(!isModal)) {
			extensionHelpers.getSetting("typeSelected")
				.then((alreadySelected)=>{
					console.log(alreadySelected)
					if (!alreadySelected)
						return window.location.hash = '#/type';

					initApp();
				})
		}
		else
github raindropio / extensions / src / routes / edit / index.jsx View on Github external
constructor(props) {
		super(props);

		this.handleBookmarkChange = this.handleBookmarkChange.bind(this);
		this.goTo = this.goTo.bind(this);
		this.buttonCollectionSelect = this.buttonCollectionSelect.bind(this);

		this.state = Object.assign({
			forceShowCollections: 	(network.getSearchParam('modal') ? true : false),
			showCollections: 		false,
			already: 				(props.location.query.already ? true : false),
			anim: 					(props.location.query.anim ? props.location.query.anim : ""),
		},this.prepareBookmark());
	}
github raindropio / extensions / src / routes / start.jsx View on Github external
bookmark() {
		bookmarkStore.onLoadURL(network.getSearchParam('saveurl'))
			.then((b)=>{
				this.bookmarkId = b._id;
				this.bookmarkAlready = b.already;
				this.isBookmarkLoaded = true;
				
				this.onSuccess();
			})
			.catch((e)=>{
				this.bookmarkError = e.toString();
				this.isBookmarkLoaded=true;

				this.onFail();
			})
	}
github raindropio / extensions / src / routes / base.jsx View on Github external
componentWillMount() {
		var elem = document.getElementById("app");
		var classNames = [];

		//is retina display?
        if (typeof window !== "undefined")
        if (window.devicePixelRatio && devicePixelRatio >= 2)
            if (typeof document !== 'undefined')
                classNames.push('retina');

        //Is modal mode
        isModal = (network.getSearchParam('modal') ? true : false);
        if (isModal)
        	classNames.push('is-modal');

        classNames = classNames.concat(strings.getCurrentBrowser());

        classNames.forEach((c)=>{
        	elem.classList.add(c);
        })

        //On blur close if is modal
        if (!__DEV__)
            window.addEventListener('blur', ()=>window.close());

        if (isModal){
        	window.addEventListener('keydown', (e)=>{
        		if (!e.defaultPrevented)