Method and apparatus for calling an extension
AssigneeUc Mobile Limited
InventorsJie Liang, Zhongkan Li
Life of this patent
Estimating the term…
Abstract
The present disclosure provides a method and apparatus for calling an extension. In the method, an obtained webpage page text that includes one or more page tag character strings can be parsed. After a document body start tag character string in the webpage page text is parsed out, a predetermined extension corresponding to the document body start tag character string can be called. According to the technical solutions provided by the present disclosure, effects of more flexible modes for modifying a page, adaptability to needs of diverse extension applications and friendly user experience can be achieved.
Claims20
A method for calling an extension, comprising:
- parsing an obtained webpage page text that includes one or more page tag character strings, the webpage page text sequentially including:
- an html start tag;
- a document body element containing a document body start tag and a document body end tag;
- and
- an html end tag;
- and
- after a document body start tag character string in the webpage page text is parsed out, calling a predetermined extension that is configured to correspond to the document body start tag character string, such that, prior to parsing of the webpage page text following the document body start tag, the predetermined extension is executed to modify a webpage that corresponds to the webpage page text.
An apparatus, comprising:
- a memory configured to store a predetermined extension that is configured to correspond to a document body start tag character string;
- a parsing module configured to parse an obtained webpage page text containing one or more page tag character strings, the webpage page text sequentially including:
- an html start tag;
- a document body element including a document body start tag and a document body end tag;
- and
- an html end tag;
- and
- a calling module configured to, after a document body start tag character string in the webpage page text is parsed out, call a predetermined extension corresponding to the document body start tag character string from the memory, such that, prior to parsing of the webpage page text following the document body start tag, the predetermined extension is executed to modify a webpage that corresponds to the webpage page text.
A computer-readable medium containing program code executable by a processor, wherein, when executed by the processor, the program code causes the processor to perform a process comprising:
- parsing an obtained webpage page text that includes one or more page tag character strings, the webpage page text sequentially including:
- an html start tag;
- a document body element including a document body start tag and a document body end tag;
- and
- an html end tag;
- and
- after a document body start tag character string in the webpage page text is parsed out, calling a predetermined extension corresponding to the document body start tag character string, such that, prior to parsing of the webpage page text following the document body start tag, the predetermined extension is executed to m e text.
Dependencies are inferred from the claim text.