(self, edit)
| 159 | |
| 160 | class FilterDnsCdnDomainCommand(sublime_plugin.TextCommand): |
| 161 | def run(self, edit): |
| 162 | buffers = get_buffer_text(self.view) |
| 163 | |
| 164 | text = buffers |
| 165 | black_text = [] |
| 166 | for line in buffers.split('\n'): |
| 167 | for fd in filter_domains: |
| 168 | if fd in line or fd == line: |
| 169 | text = text.replace(line + '\n', '') |
| 170 | black_text.append(fd) |
| 171 | |
| 172 | black_text = '\n'.join(list(set(black_text))) |
| 173 | text = "{0}\n\n# filter host:\n{1}".format(text,black_text) |
| 174 | update_file(self.view, edit, text) |
| 175 | |
| 176 | |
| 177 | # URL And Router |
nothing calls this directly
no test coverage detected