MCPcopy Create free account
hub / github.com/Tampermonkey/tampermonkey / scriptUpdate

Function scriptUpdate

src/options.js:1641–1664  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1639 lUp = '';
1640 } else {
1641 var scriptUpdate = function() {
1642 var t = last_updated.textContent;
1643 last_updated.textContent = '';
1644 last_updated.appendChild(HtmlUtil.createImage('/images/download.gif',
1645 i.name + '_down',
1646 i.id));
1647 var done = function(up) {
1648 last_updated.textContent = t;
1649 if (up) {
1650 last_updated.style.color = 'green';
1651 last_updated.title = I18N.getMessage('There_is_an_update_for_0name0_avaiable_', i.name);
1652 // close and remove tab
1653 closeAndRemoveTab();
1654 removeScriptItem();
1655 // update tab to not show the old version
1656 modifyScriptOption(null, false);
1657 } else {
1658 last_updated.style.color = 'red';
1659 last_updated.title = I18N.getMessage('No_update_found__sry_');
1660 }
1661 };
1662
1663 runScriptUpdates(i.id, done);
1664 };
1665
1666 if (!sname_name.inserted) {
1667 last_updated.addEventListener('click', function() { gCb(i.id, 'scriptUpdate'); });

Callers

nothing calls this directly

Calls 1

runScriptUpdatesFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…