MCPcopy Index your code
hub / github.com/Tampermonkey/tampermonkey / createFeatureImagesFromScript

Function createFeatureImagesFromScript

src/options.js:1871–1956  ·  view source on GitHub ↗
(i)

Source from the content-addressed store, hash-verified

1869};
1870
1871var createFeatureImagesFromScript = function(i) {
1872 var span = cr('span', i.name, i.id, 'pos_features', true);
1873
1874 if (!i.id) return span;
1875
1876 if (i.system) {
1877 var m = HtmlUtil.createImage(chrome.extension.getURL('images/lock.png'),
1878 i.name,
1879 i.id,
1880 "lock",
1881 I18N.getMessage("This_is_a_system_script"));
1882 span.appendChild(m);
1883 }
1884
1885 if (i.awareOfChrome || i.nativeScript) {
1886 var m = HtmlUtil.createImage('http://www.google.com/images/icons/product/chrome-16.png',
1887 i.name,
1888 i.id,
1889 "chrome_mode",
1890 I18N.getMessage("This_script_runs_in_Chrome_mode"));
1891 span.appendChild(m);
1892 }
1893
1894 if (i.nativeScript) return span;
1895
1896 var https_found = false;
1897 var https_check = { "includes": true, "matches": true};
1898 for (var k in https_check) {
1899 if (!i[k]) continue;
1900 for (var o=0; o<i[k].length; o++) {
1901 if (i[k][o] &&
1902 (i[k][o].search('https') != -1 ||
1903 i[k][o].search(/^\*:\/\//) != -1)) {
1904 var m = HtmlUtil.createImage(chrome.extension.getURL('images/halfencrypted.png'),
1905 i.name,
1906 i.id,
1907 "encrypt",
1908 I18N.getMessage("This_script_has_access_to_https_pages"));
1909 span.appendChild(m);
1910 https_found = true;
1911 break;
1912 }
1913 }
1914 if (https_found) break;
1915 }
1916
1917 if (i.user_agent) return span;
1918
1919 if (i.code.search('GM_xmlhttpRequest') != -1) {
1920 var m = HtmlUtil.createImage(chrome.extension.getURL('images/web.png'),
1921 i.name,
1922 i.id,
1923 "web",
1924 I18N.getMessage("This_script_has_full_web_access"));
1925 span.appendChild(m);
1926 }
1927 if (i.code.search('GM_setValue') != -1) {
1928 var m = HtmlUtil.createImage(chrome.extension.getURL('images/db.png'),

Callers 1

createScriptItemFunction · 0.85

Calls 1

crFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…