CN112287277A - New generation browsing technology for default full screen and Esc batch normal display of webpage - Google Patents

New generation browsing technology for default full screen and Esc batch normal display of webpage Download PDF

Info

Publication number
CN112287277A
CN112287277A CN202011353618.8A CN202011353618A CN112287277A CN 112287277 A CN112287277 A CN 112287277A CN 202011353618 A CN202011353618 A CN 202011353618A CN 112287277 A CN112287277 A CN 112287277A
Authority
CN
China
Prior art keywords
key
full screen
full
webpage
display
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011353618.8A
Other languages
Chinese (zh)
Inventor
芮爱平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Ha Ha Ya Ya Internet Co Ltd
Original Assignee
Shenzhen Ha Ha Ya Ya Internet Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Ha Ha Ya Ya Internet Co Ltd filed Critical Shenzhen Ha Ha Ya Ya Internet Co Ltd
Priority to CN202011353618.8A priority Critical patent/CN112287277A/en
Publication of CN112287277A publication Critical patent/CN112287277A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The browser of the new generation of browsing technology for realizing the default full screen and Esc batch normal display of the webpage adopts an F11 key to realize full screen or normal tab display of the webpage, is not popular, and is troublesome because a suggested computer needs to press two keys Fn + F11. Displaying the web page full screen gives the user a clean and nice experience of the interface, but F11 makes good functionality unfeasible. The use frequency of the Esc key is thousands times of that of the F11 key, the Esc key can be rapidly popularized among net citizens, the internet surfing experience is improved, and the Alt key and the space key are also suitable for full screen switching. The invention content is as follows: when the browser starts home page navigation or opens any hyperlink, full screen display is defaulted, an Esc key or an Alt key or a space key is pressed, all full screen display webpages are converted into normal tab display in batches, and full screen or normal display can be switched randomly; pressing any key except the full-screen switching key in the full-screen mode can trigger the full-screen mode to fail, so that normal keyboard input is met; clicking any hyperlink may reactivate full screen; implemented in Python language.

Description

New generation browsing technology for default full screen and Esc batch normal display of webpage
Technical Field
A new generation of very fast, compact full screen browsers.
Background
By 27 months 11 and 2020, all browsers (including but not limited to Google, IE, 360, Firefox, dog search and Edge browsers) in the world adopt F11 function keys to realize the switching of full-screen or normal tab display of a webpage, are not popularized in netizens, influence the internet surfing experience of 50 hundred million netizens in the world, and particularly on first or second association computers sold in the world, the function keys need to press two keys Fn + F11 at the same time, which is really troublesome. Displaying the web page in full screen does give the user a good and cool interface experience, but the F11 key is not commonly used and good functions cannot be achieved. The invention is provided under the background, the use frequency of the Esc key is thousands of times higher than that of the F11 key, and the Esc key is adopted to switch the full screen, so that the Esc key can be rapidly popularized in netizens, and the internet surfing experience of netizens all over the world is improved. A good internet experience multiplied by 50 billion net citizens would be immeasurable economic value. There are at least two more keys suitable for full screen switching of a web page: the Alt key and the space key, which are closest to the user's left thumb.
Disclosure of Invention
The invention comprises the following contents: when a browser starts to open home page navigation (such as hao123. com) or any hyperlink website, the default display is full screen (fig. 1 and fig. 2), an Esc key or an Alt key or a space key is pressed, all web pages displayed on the full screen are converted into normal page label display in batch (fig. 3 and fig. 4), a good refreshing experience of an interface is provided for a user, and the user can switch freely; under the 'full screen mode', pressing any ASCII key except a full screen switching key such as an Esc key and the like can automatically trigger the 'full screen mode' to be invalid, so that normal keyboard input is met; the use of other independent software called by the software can automatically trigger the failure of the full screen mode, and the full screen mode can be activated again by clicking any hyperlink. The technology is also suitable for free switching of full screen or normal display of the common computer application window. The Python language is the most popular computer development language at present, the Python language has the largest third-party ecosphere, and a fox browser is developed based on the C + + language and gradually turns to the Python language two years ago to be developed. The invention provides programming codes in Python language, the enabled third-party software development kits are Qt and PyQt, and the codes are debugged and passed in a self-production standard full-screen browser of an applicant company. The programming principles of the Python language are equally applicable to the C + + and JAVA languages or other high-level computer languages.
Drawings
FIG. 1, full Screen display of browser navigation Page
FIG. 2 shows a common web page displayed in full screen
FIG. 3, browser navigation Page Normal display
Fig. 4 shows a normal display of a general web page.
Detailed Description
A third-party development kit of Python 3.7, PyQt5 and PyQtWebEingine is adopted to realize a new generation of ultra-fast simple full-screen browser, the default full-screen display of a webpage is one of the main functions of the browser, and the development platform is Pycarm communication 2019.3 version. Starting with # is the comment line,/is the break line, the code is as follows:
1. main program framework code, code hiding specific classes
import sys,json,os,datetime,warnings,base64
from subprocess import Popen
# import System feature Package
from PyQt5.QtCore import QUrl, Qt, QCoreApplication, pyqtSignal, QDir, QFileInfo, /
/ QStandardPaths,QStringListModel,QPoint,QMarginsF
from PyQt5.QtWidgets import QApplication, QMainWindow, QLineEdit, QToolBar, QTabWidget, /
/ QWidget, QHBoxLayout,QDialog, QPushButton, QProgressBar, QMenu, QLabel,QMessageBox,/
/QAction,QListView,QToolButton,QCheckBox,QRadioButton,QDockWidget,QTreeView,/
/QFileDialog
from PyQt5.QtGui import QIcon,QDesktopServices,QCursor,QKeySequence,QFont, /
/ QStandardItemModel,QStandardItem,QPageLayout,QPageSize
from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEngineSettings, /
/ QWebEngineDownloadItem, QWebEnginePage
from pynput.keyboard import Controller,Key
import paramiko
import uuid,re
Third party development kit for importing data # into
download_item_ls = []
# store download task array variable
webview_group = []
# store Web instance array variables
webview_group_PDF_Finished = []
# array variables stored completed in PDF document for example Preview Web Page
webview_parent_group = []
# store Web Page parent instance array variables
webview_fullscreen_index = []
Data array variable of full screen index number of # storage webpage instance
class myQMenu(QMenu):
# rewrite QMenu Menu class
class WebView(QWebEngineView):
# rewrite Web Page QWebEngineView class
class myQLineEdit(QLineEdit):
Class # rewrite QLineEdit
class DownloadWidget(QProgressBar):
# download DownloadWidget class by definition, inherit QProgensBar class
class myQMainWindow(QMainWindow):
# rewrite QMainWindow class
class FindToolBar(QToolBar):
# custom Page finds FindToolBar class, inherits QToolBar class
class BookmarkWidget(QTreeView):
# self-defined bookmark class, inheritance QTreeView class
class Browser(myQMainWindow):
Self-defining Browser class, # calling WebView class, inheriting myQMainWindow class
class MyBrowser(myQMainWindow):
Self-defining MyBrowser class, # calling the Browser class, inheriting the MyQNainWindow class
if __name__ == "__main__":
# Main program
argvs = sys.argv
argvs.append("--no-sandbox")
QCoreApplication.setAttribute(Qt.AA_UseSoftwareOpenGL)
app = QApplication(argvs)
window = MyBrowser()
# instantiating the Main Window and Loading the Home Page
window.show()
# display Main Window
sys.exit(app.exec_())
2. Specific code related to full screen display switching
class WebView(QWebEngineView):
The # self-defined WebView class inherits the QebEngineView class, which is a webpage display module of PyQt
@staticmethod
def minimum_zoom_factor():
return 0.25
@staticmethod
def maximum_zoom_factor():
return 5
def __init__(self, mainWin):
super().__init__(mainWin)
self.mainWin = mainWin
def createWindow(self, QWebEnginePage_WebWindowType):
Method for creating webpage window
new_webview = WebView(self.mainWin)
self.mainWin.create_tab(new_webview)
Method for creating second and above tab of # calling Browser instance
return new_webview
# Return open Page instance
class MyBrowser(myQMainWindow):
……
Method for creating main window and first navigation tab
def newTab(self):
Method for creating first navigation tab
self.tab = QWidget()
self
self.tabWidget.setCurrentWidget(self.tab)
self.Layout = QHBoxLayout(self.tab)
self.Layout.addWidget(Browser(self))
# load Browser () instance on the first new tab
class Browser(myQMainWindow):
def create_tab(self, webview):
Method for creating second and above tabs
self.tab = QWidget()
self.mainWin.tabWidget.addTab(self.tab, '')
self.mainWin.tabWidget.setCurrentWidget(self.tab)
self.Layout = QHBoxLayout(self.tab)
web_view=Browser(self.mainWin, webview=webview)
# recursively calls this class, instantiates hyperlinked web pages, appends address fields
self.Layout.addWidget(web_view)
# load Web Page and additional Address Bar into New Page Label
webview.setParent(None)
# put new web page on top
webview.showFullScreen()
# let New Page display full Screen by Default
webview_fullscreen_index.append(self.mainWin.INDEX)
# saving the index number of the new Page to the array variable webview _ fullscreen _ index
web_view.grabKeyboard()
# sets the web page and the additional address bar as the capture keyboard, and enters the full screen mode
def initUI(self):
if self.webview == None:
self.webview = WebView(self)
self.webview.load(QUrl("http://www.hao123.com/"))
elif self.webview == '':self.webview = WebView(self)
self.webview.setZoomFactor(1.35)
webview_group.append(self.webview)
# Add a Web instance to an array variable webview _ group
webview_group_PDF_Finished.append(0)
self.webview.page().titleChanged.connect(self._title_changed)
self.webview.page().iconChanged.connect(self._icon_changed)
self.initToolbar(self.webview)
self.setCentralWidget(self.webview)
webview_parent_group.append(self.webview.parent())
# Add the parent instance of the Web Page to the array variable webview _ parent _ group
if self.mainWin.INDEX==0:
If # is the first navigation tab, the following code is executed
self.webview.setParent(None)
# set navigation pages at the top
self.webview.showFullScreen()
# set navigation Page to Default full Screen display
webview_fullscreen_index.append(0)
Add index number 0 of navigation page to array variable webview _ fullscreen _ index
webview_parent_group[0].grabKeyboard()
Let the navigation page parent instance go to "full screen mode"
def keyPressEvent(self, QKeyEvent):
Method for processing keyboard input in # full screen mode
key = QKeyEvent.key()
# obtaining keyboard input values
if self.urlbar.hasFocus():self.release_keyboard()
If the address bar has focus, the full screen mode is disabled, and the address bar takes over normal keyboard input
elif key == Qt.Key_Escape or key == Qt.Key_Space or QKeyEvent.modifiers() == /
/ Qt.AltModifier:
If Esc piece or space key or Alt key is input, # the full screen mode is processed as follows
if not webview_group[self.mainWin.INDEX].isFullScreen():
If the current webpage is not full screen display, executing the following codes to enter a full screen display state
webview_group[self.mainWin.INDEX].setParent(None)
# set the current Web Page at the top
webview_group[self.mainWin.INDEX].showFullScreen()
# displaying the current webpage in full screen
webview_fullscreen_index.append(self.mainWin.INDEX)
# Add the index number of the current web page to the array variable webview _ fullscreen _ index
print('Esc full screen...')
else:
If the display is in the full-screen display state currently, executing the following codes, and restoring the batch display to the normal display
for i in range(0,len(webview_fullscreen_index)):
# column-pass web page full screen array variable webview _ fullscreen _ index
webview_group[webview_fullscreen_index[i]].showNormal()
# make the web pages normally displayed one by one
webview_parent_group[webview_fullscreen_index[i]].setCentralWidget( /
/ webview_group[webview_fullscreen_index[i]])
# Place normally displayed Web pages one by one to the corresponding parent instance
print('Esc normal screen...')
webview_fullscreen_index.clear()
# clear full Screen index array variable webview _ fullscreen _ index
else:
self.release_keyboard()
Method for disabling full screen mode of # calling webpage
keyboard = Controller()
# simulated keyboard instantiation
if key == Qt.Key_Backspace:
# handles the inverted lattice key, Qt does not allow analog input of the inverted lattice key, and may require two-step simulation for security reasons
keyboard.press(Key.left)
# simulation presses the left cursor key to let the control of take-over catch
keyboard.release(Key.left)
# simulation loosens the left cursor key, lets the control of take-over catch
keyboard.press(Key.delete)
# simulation presses the delete key to let the take-over control capture
keyboard.release(Key.delete)
# simulation releases the delete key, lets the control of the take-over catch
elif key>32 and key<=126:
If the pressed key is a printed character except a blank space, the keyboard input should be simulated to avoid the repeated input of the user
keyboard.press(chr(key))
# simulation presses other keys to let the take-over control capture
keyboard.release(chr(key))
# simulation loosens other keys, lets the control of the takeover catch
def release_keyboard(self):
Method for disabling full screen mode of webpage
for i in range(0, len(webview_fullscreen_index)):
# column-pass web page full screen index number array variable webview _ fullscreen _ index
webview_group[webview_fullscreen_index[i]].showNormal()
# let each Web Page display normally
webview_parent_group[webview_fullscreen_index[i]].setCentralWidget( /
/ webview_group[webview_fullscreen_index[i]])
# Place normally displayed Web pages in corresponding tabs
webview_fullscreen_index.clear()
# full Screen index number array variable clear
for i in range(0, len(webview_parent_group)):webview_parent_group[i].releaseKeyboard()
# individually invalidates "full screen mode" for parent instances of a web page
3. The following codes solve the problem of no cursor display of the website bar influenced by the' full screen mode
class myQLineEdit(QLineEdit):
Class # rewrite QLineEdit
def __init__(self, parent=None):
super(myQLineEdit, self).__init__(parent)
self.save_text = ''
def mousePressEvent(self, event):
# this method can resume the website bar cursor display
message = QMessageBox()
message.setWindowTitle(' ')
message.setStandardButtons(QMessageBox.Ok)
message.button(QMessageBox.Ok).animateClick(35)
# pops up an information box with only OK key, and after delaying 35 ms, it is automatically closed, and the cursor is displayed
message.exec_()
def wheelEvent(self, event):
……
def addrs_ok(self):
……
Note: the website bar is an example of the self-defined myQLineEdit class
4. Video full screen display code
self.part = ''
# initialize store video parent instance variable
webview.settings().setAttribute(QWebEngineSettings.FullScreenSupportEnabled, True)
# settings allow full screen display of web page video
webview.page().fullScreenRequested.connect(self._fullScreenRequested)
Method for setting video full screen instruction association _ fullscreenrequest
def _fullScreenRequested(self,request):
# custom video full screen display or normal switching _ fullscreenrequest method
request.accept()
if request.toggleOn():
# switching video full Screen display with the following code
self.part = self.webview.parent()
self.webview.setParent(None)
self.webview.showFullScreen()
else:
# switching video Normal display
self.webview.setParent(self.part)
self.webview.showNormal()
5. Example code invoking third-party software
def word(self):
Word method for self-defining call
for i in range(0, len(webview_parent_group)): webview_parent_group[i].releaseKeyboard()
The # list-pass web page parent array variable disables the full screen mode one by one, and the wps document software takes over the keyboard input
Popen(["/root/opt/kingsoft/wps-office/office6/wps" ])
# calling built-in function to run wps document software
def gscan2pdf(self):
# custom calling gscan2pdf method
for i in range(0, len(webview_parent_group)): webview_parent_group[i].releaseKeyboard()
Using # list-pass web page parent array variable to make "full screen mode" ineffective one by one, and making scanning software take over keyboard input
Popen(["/usr/bin/gscan2pdf"])
# Call built-in function and run gscan2pdf scanning software
6. Python program compilation command
Under Terminal of pychar development platform, the following commands are run to perform compilation:
/usr/local/python3/bin/pyinstaller --clean -Dw --noconsole --noconfirm –i /
/ img/hahayaya_logo1.png bzWeb.py
note: py, img/hahayaya _ logo1.png are program icons, and the compiled execution program bzWeb is placed in a dist/bzWeb directory.

Claims (6)

1. When any webpage is opened, full screen display is defaulted, the browser enters full screen era, a navigation page is adopted as a home page (such as hao123. com), the webpage is displayed in full screen mode when a hyperlink is clicked, and all opened webpages can be normally displayed in batch by pressing an Esc key, a space key or an Alt key.
2. When any webpage is browsed, normal display or full-screen display can be switched at will by pressing an Esc key or a space key or an Alt key, and when the webpage is normally displayed, a function button of a browser or a main menu can be operated.
3. Whether the text is displayed normally or in full screen, the text content can be normally input in a text input box or a website bar of a webpage, and the first input character can trigger automatic quit of a full screen mode and enable a keyboard to normally input; after exiting the 'full screen mode', clicking any web page hyperlink re-enters the 'full screen mode'.
4. The full-screen display of the webpage and the full-screen display of the video cannot be mixed into one conversation, and the two can be operated independently; the technology of claims 1-3 is also suitable for switching full screen or normal display of a window of common computer application software.
5. The key for switching freely between full screen and normal display is not limited to the Esc key or space key or Alt key in claim 1, and is suitable for any "single ASCII key" with preference given to the commonly used single control key.
6. The method of claims 1-4 is applicable to browsers and software under various operating systems and is also applicable to various computer languages; home navigation is not limited to hao123.com, and other navigation web addresses are also suitable.
CN202011353618.8A 2020-11-27 2020-11-27 New generation browsing technology for default full screen and Esc batch normal display of webpage Pending CN112287277A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011353618.8A CN112287277A (en) 2020-11-27 2020-11-27 New generation browsing technology for default full screen and Esc batch normal display of webpage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011353618.8A CN112287277A (en) 2020-11-27 2020-11-27 New generation browsing technology for default full screen and Esc batch normal display of webpage

Publications (1)

Publication Number Publication Date
CN112287277A true CN112287277A (en) 2021-01-29

Family

ID=74425572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011353618.8A Pending CN112287277A (en) 2020-11-27 2020-11-27 New generation browsing technology for default full screen and Esc batch normal display of webpage

Country Status (1)

Country Link
CN (1) CN112287277A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150301991A1 (en) * 2012-06-08 2015-10-22 Tencent Technology (Shenzhen) Company Limited Webapp startup method and device
US9588636B1 (en) * 2013-12-17 2017-03-07 Google Inc. Exit full screen mode of a web browser on content-based event
CN111859227A (en) * 2020-08-07 2020-10-30 深圳市哈哈丫丫互联网有限公司 Browser value-added technology for switching full screen or normal display of webpage at will by Esc key

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150301991A1 (en) * 2012-06-08 2015-10-22 Tencent Technology (Shenzhen) Company Limited Webapp startup method and device
US9588636B1 (en) * 2013-12-17 2017-03-07 Google Inc. Exit full screen mode of a web browser on content-based event
CN111859227A (en) * 2020-08-07 2020-10-30 深圳市哈哈丫丫互联网有限公司 Browser value-added technology for switching full screen or normal display of webpage at will by Esc key

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
卢卫中、陈伟: "《基于JavaScript网页编程》", 重庆大学电子音像出版社, pages: 89 - 90 *

Similar Documents

Publication Publication Date Title
US20090031243A1 (en) Method and apparatus for controlling display of windows
US20110197124A1 (en) Automatic Creation And Management Of Dynamic Content
US10496276B2 (en) Quick tasks for on-screen keyboards
US20060090138A1 (en) Method and apparatus for providing DHTML accessibility
US20070016480A1 (en) Home page advertising method
US9292156B2 (en) Enabling a user to invoke a function via a shortcut key in a multi-window computing environment
TW581968B (en) Method and apparatus for producing user interfaces and device functionality for processor-based devices having embedded operating system and programming framework
CN107404576B (en) Screen-locked magazine browsing method, mobile terminal and computer-readable storage medium
CN101882007A (en) Method and device for carrying out information input and execution based on input interface
CN111859227A (en) Browser value-added technology for switching full screen or normal display of webpage at will by Esc key
US20230229406A1 (en) Page rendering method, apparatus, electronic device, computer-readable storage medium, and computer program product
US20180088966A1 (en) Electronic device and method thereof for managing applications
US8291325B2 (en) Location specific display of information resources on a host interface
KR20070040845A (en) A display module, a device, a computer software product and a method for a user interface view
CN112256244A (en) Innovative technology of extremely-fast simple green Linux browser
CN112487340A (en) Innovative technology of extremely-fast simple anti-theft Linux full-screen browser
CN112287277A (en) New generation browsing technology for default full screen and Esc batch normal display of webpage
US20070143708A1 (en) Overloaded hyperlink
CN111078024A (en) Method for dynamically adjusting keyboard output signal
Smyth Android Studio 3.0 Development Essentials-Android 8 Edition
CN113608645A (en) Innovative technology for switching full-screen or window display and default full-screen browser at blank position of webpage by double-clicking of mouse
CN112416502A (en) New technology for closing webpage by pressing-number or right-clicking menu in full-screen display mode
KR20140116400A (en) Enabling performant cascading operations
CN110231934B (en) A kind of business handling general-purpose platform development approach based on Windows system all-in-one machine
CN114296845A (en) Interface processing method, device, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination