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") |