-
-
Save 17/44b0f255db9e84e69e4a019e6ed36414 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($, f) { | |
f = function (m, o) { | |
return $.ajax($.extend({ | |
type: 'POST', | |
url: $('#timeRestartModal > form').attr('action'), | |
data: { | |
'timeRebootEnablestatus': 'on', | |
'timeRebootrange': '00:00 | ' + m, | |
'cururl': '' | |
} | |
}, o)) | |
} | |
f('wget http://breed.hackpascal.net/breed-mt7620-phicomm-psg1208.bin') | |
.then(f('mtd unlock Bootloader')) | |
.then(f('mtd -r write breed-mt7620-phicomm-psg1208.bin Bootloader', { | |
timeout: '5000' | |
})) | |
.always(function () { | |
return $.ajax({ | |
type: 'GET', | |
url: location + '', | |
timeout: '1000' | |
}).then(function () { | |
alert('更新失败。') | |
// alert('fail') | |
}, function () { | |
alert('更新完成,设备正在重启。请手动检查设备状态。') | |
// alert('done') | |
}) | |
}) | |
})(jQuery) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment