if (provider.id === 'mastodon') { const masto_domain = window.prompt( 'Please enter the domain name of the Mastodon instance you want to sign in with:', 'mastodon.social'
return ret; var rawPrompt = window.prompt; window.prompt = function(str){ var ret = rawPrompt.call(this, str);
// `notification.prompt` executes asynchronously setTimeout(function() { var result = window.prompt(message, defaultText || ''); if (callback) { if (result === null) { callback({ buttonIndex: 2, input1: '' }); // Cancel } else { callback({ buttonIndex: 1, input1: result }); // OK } } }, 0);
handleEdit(e){ const id = Number(e.target.dataset.id); const val = this.props.fot.get(id).text let newVal = window.prompt('', val); this.props.editFot(id, newVal); }
componentDidMount() { const username = window.prompt('Username: ', 'Anonymous'); this.setState({ username }); const pusher = new Pusher('YOUR_PUSHER_APP_KEY', { cluster: 'YOUR_CLUSTER', encrypted: true }); const channel = pusher.subscribe('chat'); channel.bind('message', data => { this.setState({ chats: [...this.state.chats, data], test: '' }); }); this.handleTextChange = this.handleTextChange.bind(this); }
Core.BuiltinFunc.create(function(text, defval) { // if no prompt, raise exception if (typeof prompt === "undefined") { throw new Errors.RuntimeError("rawInput not supported on this platform!"); } // show prompt and return result value return window.prompt(text._value, defval ? defval._value : ""); }, 1, 1, false )
(function (process,global,Buffer,__argument0,__argument1,__argument2,__argument3,__filename,__dirname){ module.exports = isFunction var toString = Object.prototype.toString function isFunction (fn) { var string = toString.call(fn) return string === '[object Function]' || (typeof fn === 'function' && string !== '[object RegExp]') || (typeof window !== 'undefined' && // IE8 and below (fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt)) }; }).call(this,require("b55mWE"),typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/../../node_modules/is-function/index.js","/../../node_modules/is-function")
function scan(success, error) { var code = window.prompt("Enter barcode value (empty value will fire the error handler):"); if(code) { var result = { text:code, format:"Fake", cancelled:false }; success(result); } else { error("No barcode"); } }
pd(() => { let ticker = window.prompt('What ticker?'); if (!ticker) return; ticker = ticker.toUpperCase(); let totalAmtToSpend = window.prompt('How much would you like to spend?', 100); if (!totalAmtToSpend) return; totalAmtToSpend = Number(totalAmtToSpend); console.log({ ticker, totalAmtToSpend }); this.props.socket.emit('client:act', 'limitBuyMultiple', { ticker, totalAmtToSpend, strategy: 'web-client' }, () => window.alert(`LIMIT BOUGHT ${ticker}`)); })
Object.keys(contractInterface).map((type) => <button key={type} onClick={() => { const args = { type } for (const arg of contractInterface[type]) { args[arg] = window.prompt(`Value for argument '${arg}':\n`) if (!args[arg]) return } if (args.num_confirmations) { args.num_confirmations = parseInt(args.num_confirmations) } if (args.amount) { args.amount = toNear(args.amount) } const MultiSigRequestAction = args const MultiSigRequestTransaction = { receiver_id: args.receiver_id ? args.receiver_id : contractName, actions: [MultiSigRequestAction] } const MultiSigRequest = { request: MultiSigRequestTransaction } changeMethod('add_request_and_confirm', MultiSigRequest) }} > {type} </button> )
<ul> <li><a onClick={pd((evt) => { const ticker = window.prompt('Enter a ticker or leave blank'); console.log({ ticker }); this.act('cancelAllOrders', ticker || undefined)(evt);
const minutes = Number(window.prompt('How many minutes do you want?', settings.customTime || '')) if (minutes <= 0) { window.alert('Invalid. Must be greater than 0 minutes.')