Every line of 'window.history.go(-1)' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
65 function forward(steps = 1) { 66 if (canGoForward(steps)) { 67 currentPosition += steps; 68 } else { 69 currentPosition = historyData.length - 1; 70 } 71 72 process.nextTick(notifyListeners); 73 return current(); 74 }
106 go(n) { 107 if (typeof n !== 'number') { 108 throw new Error('n should be a number') 109 } 110 history.go(n) 111 }
58 $goBack() { 59 this.history.goBack(); 60 }
48 export function pushHistoryPath(history, path, search) { 49 pushOrUpdateHistory(history, false, null, null, path, search); 50 }
83 updateHistory() { 84 if (count >= 18) { 85 colors.shift() 86 } 87 this.$items.forEach((v, i) => { 88 setStyle('background', colors[colors.length - 1 - i], v) 89 if (i < count) { 90 addClass(this.classes.HISTORYITEMEMPTY, v) 91 } 92 }) 93 }
45 function do_history(args) 46 { 47 var h = "" 48 for (var i in history_list) { 49 h += "<div>" + i + " " + history_list[i] + "</div>"; 50 } 51 return h; 52 }
177 private insertIntoHistory(c: CommandInformation) { 178 const preservedHistory = 179 this.history.length === this.MAX_HISTORY 180 ? this.history.slice(1) 181 : this.history; 182 this.history = [...preservedHistory, c]; 183 }
56 function topHistory({ 57 limit = 15, 58 exclude = [], 59 } = {}) { 60 const excludeURLs = Array(exclude.length).fill('?').join(','); 61 return queryHistory(` 62 select distinct rev_host as rev_host, title as title, url as url, max(total_count) as total_count from ( 63 select mzh.url as url, mzh.title as title, sum(mzh.days_count) as total_count, mzh.rev_host as rev_host 64 from ( 65 select moz_places.url, moz_places.title, moz_places.rev_host, moz_places.visit_count, 66 moz_places.last_visit_date, moz_historyvisits.*, 67 (moz_historyvisits.visit_date / (86400* 1000000) - (strftime('%s', date('now', '-6 months'))/86400) ) as days_count 68 from moz_historyvisits, moz_places 69 where moz_places.typed == 1 70 and moz_places.hidden == 0 71 and moz_historyvisits.visit_date > (strftime('%s', date('now', '-6 months'))*1000000) 72 and moz_historyvisits.place_id == moz_places.id 73 and moz_places.visit_count > 1 74 and (moz_historyvisits.visit_type < 4 or moz_historyvisits.visit_type == 6) 75 and lower(moz_places.url) not like 'moz-extension:%' 76 and moz_places.url not in (${excludeURLs}) 77 ) as mzh 78 group by mzh.place_id 79 order by total_count desc, mzh.visit_count desc, mzh.last_visit_date desc 80 ) group by rev_host order by total_count desc limit ${limit} 81 `, ['url', 'title'], exclude); 82 }