-
Notifications
You must be signed in to change notification settings - Fork 0
/
bookmarklet.html
23 lines (23 loc) · 966 Bytes
/
bookmarklet.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<html>
<head>
</head>
<body>
<a href="javascript:(function(){
var d = new Date();
d.setDate(d.getDate()-1);
var max_date = d.getFullYear() + '-' + (d.getMonth()+1) + '-' + d.getDate();
var min_date = d.getFullYear() + '-' + (d.getMonth()+1) + '-' + d.getDate();
var domain = document.domain;
var url = 'https://' + domain + '/admin/orders/export?created_at_max=' + max_date + '&created_at_min=' + min_date;
window.open(url); })();">Export Yesterday's Orders</a>
<a href="javascript:(function(){
var d = new Date();
d.setDate(d.getDate()-1);
var max_date = d.getFullYear() + '-' + (d.getMonth()+1) + '-' + d.getDate();
d.setDate(d.getDate()-3)
var min_date = d.getFullYear() + '-' + (d.getMonth()+1) + '-' + d.getDate();
var domain = document.domain;
var url = 'https://' + domain + '/admin/orders/export?created_at_max=' + max_date + '&created_at_min=' + min_date;
window.open(url); })();">Export Last 3 Days' Orders</a>
</body>
</html>