Beispiel #1
0
    def run(self,
            args,
            activate_browser=True,
            browser_name='all',
            auto_save=True,
            delay=None):

        # Auto-save
        if auto_save and self.view and self.view.is_dirty():
            self.view.run_command('save')

        # Detect OS and import
        if _os == 'Darwin':
            from mac import MacBrowserRefresh
            from mac.utils import running_browsers
            refresher = MacBrowserRefresh(activate_browser, running_browsers())
        elif _os == 'Windows':
            from win import WinBrowserRefresh
            refresher = WinBrowserRefresh(activate_browser)
        else:
            sublime.error_message('Your operating system is not supported')

        # Delay refresh
        if delay is not None:
            import time
            time.sleep(delay)

        # Actually refresh browsers
        if browser_name == 'Google Chrome':
            refresher.chrome()

        elif browser_name == 'Google Chrome Canary' and _os == 'Darwin':
            refresher.canary()

        elif browser_name == 'yandex' and _os == 'Darwin':
            refresher.yandex()

        elif browser_name == 'Safari':
            refresher.safari()

        elif browser_name == 'WebKit' and _os == 'Darwin':
            refresher.webkit()

        elif browser_name == 'Firefox':
            refresher.firefox()

        elif browser_name == 'Opera':
            refresher.opera()

        elif browser_name == 'IE' and _os == 'Windows':
            refresher.ie()

        elif browser_name == 'Iron' and _os == 'Windows':
            refresher.iron()

        elif browser_name == 'all':
            refresher.chrome()
            refresher.safari()
            refresher.firefox()
            refresher.opera()

            if _os == 'Darwin':
                refresher.canary()
                refresher.yandex()
                refresher.webkit()

            if _os == 'Windows':
                refresher.ie()
                refresher.iron()
    def run(self, args, activate_browser=True, browser_name="all", auto_save=True, delay=None):

        # Auto-save
        if auto_save and self.view and self.view.is_dirty():
            self.view.run_command("save")

        # Detect OS and import
        if _os == "Darwin":
            from mac import MacBrowserRefresh
            from mac.utils import running_browsers

            refresher = MacBrowserRefresh(activate_browser, running_browsers())
        elif _os == "Windows":
            from win import WinBrowserRefresh

            refresher = WinBrowserRefresh(activate_browser)
        elif _os == "Linux":
            from linux import LinuxBrowserRefresh

            refresher = LinuxBrowserRefresh(activate_browser)
        else:
            sublime.error_message("Your operating system is not supported")

        # Delay refresh
        if delay is not None:
            import time

            time.sleep(delay)

        # Actually refresh browsers
        if browser_name == "Google Chrome":
            refresher.chrome()

        elif browser_name == "Google Chrome Canary" and _os == "Darwin":
            refresher.canary()

        elif browser_name == "yandex" and _os == "Darwin":
            refresher.yandex()

        elif browser_name == "Safari":
            refresher.safari()

        elif browser_name == "WebKit" and _os == "Darwin":
            refresher.webkit()

        elif browser_name == "Firefox":
            refresher.firefox()

        elif browser_name == "Opera":
            refresher.opera()

        elif browser_name == "IE" and _os == "Windows":
            refresher.ie()

        elif browser_name == "Iron" and _os == "Windows":
            refresher.iron()

        elif browser_name == "Pale Moon" and _os == "Windows":
            refresher.palemoon()

        elif browser_name == "all":
            refresher.chrome()
            refresher.safari()
            refresher.firefox()
            refresher.opera()

            if _os == "Darwin":
                refresher.canary()
                refresher.yandex()
                refresher.webkit()

            if _os == "Windows":
                refresher.ie()
                refresher.iron()
                refresher.palemoon()
    def run(self,
            args,
            activate_browser=True,
            browser_name="all",
            auto_save=True,
            delay=None):

        # Auto-save
        if auto_save == True and self.view and self.view.is_dirty():
            self.view.run_command("save")

        # Detect OS and import
        if _os == 'Darwin':
            from mac import MacBrowserRefresh
            refresher = MacBrowserRefresh(activate_browser)
        elif _os == 'Windows':
            from win import WinBrowserRefresh
            refresher = WinBrowserRefresh(activate_browser)
        else:
            sublime.error_message('Your operating system is not supported')

        # Delay refresh
        if delay is not None:
            import time
            time.sleep(delay)

        # Actually refresh browsers
        if browser_name == "Google Chrome":
            refresher.chrome()

        elif browser_name == "Safari":
            refresher.safari()

        elif browser_name == "Firefox":
            refresher.firefox()

        elif browser_name == "Opera":
            refresher.opera()

        elif browser_name == 'IE' and _os == 'Windows':
            refresher.ie()

        elif browser_name == 'Iron' and _os == 'Windows':
            refresher.iron()

        elif browser_name == 'all':
            refresher.chrome()
            refresher.safari()
            refresher.firefox()
            refresher.opera()

            if _os == 'Windows':
                refresher.ie()
                refresher.iron()
    def run(self,
            args,
            activate=True,
            browsers=['chrome'],
            auto_save=True,
            delay=None):

        _os = platform.system()

        # Auto-save
        if auto_save and self.view and self.view.is_dirty():
            self.view.run_command('save')

        # Detect OS and import
        if _os == 'Darwin':
            from mac import MacBrowserRefresh
            refresher = MacBrowserRefresh(activate)
        elif _os == 'Windows':
            from win import WinBrowserRefresh
            refresher = WinBrowserRefresh(activate)
        elif _os == 'Linux':
            from linux import LinuxBrowserRefresh
            refresher = LinuxBrowserRefresh(activate)
        else:
            sublime.error_message('Your operating system is not supported')

        # Delay refresh
        if delay is not None:
            import time
            time.sleep(delay)

        # Actually refresh browsers
        if 'chrome' in browsers:
            refresher.chrome()

        if 'canary' in browsers and _os == 'Darwin':
            refresher.canary()

        if 'yandex' in browsers and _os == 'Darwin':
            refresher.yandex()

        if 'safari' in browsers:
            refresher.safari()

        if 'safari_pre' in browsers:
            refresher.safari_pre()

        if 'webkit' in browsers and _os == 'Darwin':
            refresher.webkit()

        if 'firefox' in browsers:
            refresher.firefox()

        if 'firefoxdev' in browsers and _os == 'Darwin':
            refresher.firefox_dev()

        if 'opera' in browsers:
            refresher.opera()

        if 'ie' in browsers and _os == 'Windows':
            refresher.ie()

        if 'iron' in browsers and _os == 'Windows':
            refresher.iron()

        if 'palemoon' in browsers and _os == 'Windows':
            refresher.palemoon()
	def run(self, args, activate_browser=False,
			browser_name='all', auto_save=True, delay=0):

		print(args)

		print('Refreshing Browsers')

		# Auto-save
		if auto_save and self.view and self.view.is_dirty():
			self.view.run_command('save')

		# Detect OS and import
		if _os == 'Darwin':
			from mac import MacBrowserRefresh
			from mac.utils import running_browsers
			refresher = MacBrowserRefresh(activate_browser, running_browsers())
		elif _os == 'Windows':
			from win import WinBrowserRefresh
			refresher = WinBrowserRefresh(activate_browser)
		else:
			sublime.error_message('Your operating system is not supported')

		# Delay refresh
		if delay is not None:
			import time
			time.sleep(delay)

		# Actually refresh browsers
		if browser_name == 'Google Chrome':
			refresher.chrome()

		elif browser_name == 'Google Chrome Canary' and _os == 'Darwin':
			refresher.canary()

		elif browser_name == 'Safari':
			refresher.safari()

		elif browser_name == 'WebKit' and _os == 'Darwin':
			refresher.webkit()

		elif browser_name == 'Firefox':
			refresher.firefox()

		elif browser_name == 'Opera':
			refresher.opera()

		elif browser_name == 'IE' and _os == 'Windows':
			refresher.ie()

		elif browser_name == 'Iron' and _os == 'Windows':
			refresher.iron()

		elif browser_name == 'all':
			refresher.chrome()
			refresher.safari()
			refresher.firefox()
			refresher.opera()

			if _os == 'Darwin':
				refresher.canary()
				refresher.webkit()

			if _os == 'Windows':
				refresher.ie()
				refresher.iron()
    def run(self, args, activate_browser=True,
        browser_name="all", auto_save=True,
        delay=None):

        # Auto-save
        if auto_save == True and self.view and self.view.is_dirty():
            self.view.run_command("save")

        # Detect OS and import
        if _os == 'Darwin':
            from mac import MacBrowserRefresh
            refresher = MacBrowserRefresh(activate_browser)
        elif _os == 'Windows':
            from win import WinBrowserRefresh
            refresher = WinBrowserRefresh(activate_browser)
        else:
            sublime.error_message('Your operating system is not supported')

        # Delay refresh
        if delay is not None:
            import time
            time.sleep(delay)

        # Actually refresh browsers
        if browser_name == "Google Chrome":
            refresher.chrome()

        elif browser_name == "Safari":
            refresher.safari()

        elif browser_name == "Firefox":
            refresher.firefox()

        elif browser_name == "Opera":
            refresher.opera()

        elif browser_name == 'IE' and _os == 'Windows':
            refresher.ie()

        elif browser_name == 'Iron' and _os == 'Windows':
            refresher.iron()

        elif browser_name == 'all':
            refresher.chrome()
            refresher.safari()
            refresher.firefox()
            refresher.opera()

            if _os == 'Windows':
                refresher.ie()
                refresher.iron()
    def run(self, args, activate=True,
            browsers=['chrome'], auto_save=True, delay=None):

        _os = platform.system()

        # Auto-save
        if auto_save and self.view and self.view.is_dirty():
            self.view.run_command('save')

        # Detect OS and import
        if _os == 'Darwin':
            from mac import MacBrowserRefresh
            refresher = MacBrowserRefresh(activate)
        elif _os == 'Windows':
            from win import WinBrowserRefresh
            refresher = WinBrowserRefresh(activate)
        elif _os == 'Linux':
            from linux import LinuxBrowserRefresh
            refresher = LinuxBrowserRefresh(activate)
        else:
            sublime.error_message('Your operating system is not supported')

        # Delay refresh
        if delay is not None:
            import time
            time.sleep(delay)

        # Actually refresh browsers
        if 'chrome' in browsers:
            refresher.chrome()

        if 'canary' in browsers and _os == 'Darwin':
            refresher.canary()

        if 'yandex' in browsers and _os == 'Darwin':
            refresher.yandex()

        if 'safari' in browsers:
            refresher.safari()

        if 'webkit' in browsers and _os == 'Darwin':
            refresher.webkit()

        if 'firefox' in browsers:
            refresher.firefox()

        if 'firefoxdev' in browsers and _os == 'Darwin':
            refresher.firefox_dev()

        if 'pinegrow' in browsers and _os == 'Darwin':
            refresher.pinegrow()

        if 'opera' in browsers:
            refresher.opera()

        if 'ie' in browsers and _os == 'Windows':
            refresher.ie()

        if 'iron' in browsers and _os == 'Windows':
            refresher.iron()

        if 'palemoon' in browsers and _os == 'Windows':
            refresher.palemoon()