Helpviewer/GreaseMonkey/GreaseMonkeyScript.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 3002
6ffc581f00f1
child 3145
a9de05d4a22f
equal deleted inserted replaced
3056:9986ec0e559a 3057:10516539f238
168 168
169 def match(self, urlString): 169 def match(self, urlString):
170 """ 170 """
171 Public method to check, if the script matches the given URL. 171 Public method to check, if the script matches the given URL.
172 172
173 @param urlString URL (string)
173 @return flag indicating a match (boolean) 174 @return flag indicating a match (boolean)
174 """ 175 """
175 if not self.__enabled: 176 if not self.__enabled:
176 return False 177 return False
177 178
185 186
186 return False 187 return False
187 188
188 def __parseScript(self, path): 189 def __parseScript(self, path):
189 """ 190 """
190 Private method to parse the given script and populate the data structure. 191 Private method to parse the given script and populate the data
192 structure.
191 193
192 @param path path of the Javascript file (string) 194 @param path path of the Javascript file (string)
193 """ 195 """
194 try: 196 try:
195 f = open(path, "r", encoding="utf-8") 197 f = open(path, "r", encoding="utf-8")

eric ide

mercurial