File: scriptMatchesUrlAndRuns.js

package info (click to toggle)
greasemonkey 2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 1,820 kB
  • sloc: xml: 171; makefile: 10
file content (9 lines) | stat: -rw-r--r-- 285 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
const EXPORTED_SYMBOLS = ['scriptMatchesUrlAndRuns'];

function scriptMatchesUrlAndRuns(script, url, when) {
  return !script.pendingExec.length
      && script.enabled
      && !script.needsUninstall
      && (script.runAt == when || 'any' == when)
      && script.matchesURL(url);
}