Skip to content

Capture comments from Appinn forums and display them on the homepage

Through this custom engine, you will be able to automatically crawl and display the content of the corresponding forum posts when browsing the content of the Appinn main website.

comment

Add new engine

Open the SearchJumper configuration page and add an engine to the "Current Web Page" group of your SearchJumper.

Fill in the URL input box

html
showTips:%t 
<style>
#topic-title, #post_1, footer, header, .meta{
 display: none;
}
#main-outlet {
  padding: 20px;
  text-align: left;
}
a {
 color: gray;
}
.crawler-post-meta {
 font-size: 12px;
}
aside.quote {
    margin: 10px 0px 0px 20px;
    font-style: italic;
}
img {
    max-height: 200px;
    width: auto;
}
aside.onebox {
    font-size: small;
    border: 1px solid;
    border-radius: 10px;
    padding: 10px;
    margin: 5px;
}
#main-outlet {
    max-height: 800px;
    overflow: auto;
    pointer-events: all;
}
</style>
{noscript[data-path]|innerHTML}

Among them, showTips at the beginning means that the engine will capture and display information when the mouse is hovering, and %t means that the target of the capture is the link currently pointed by the mouse.

The following is the HTML template that needs to be displayed after crawling, where {noscript[data-path]|innerHTML} is the captured content, specifically the innerHTML attribute of the corresponding element of noscript[data-path].

Then click on "More Options" and enter https://meta\.appinn\.net/t/topic/ in the "Search word or filtering rule pointing to the link", which means that only when the mouse points to the niche software forum The engine is displayed only if there is a link in the link, and is hidden the rest of the time.

Save the engine.

Use

Open any article on the niche software homepage. Scroll down the page to find the "Click to join the discussion" button. Hold down CTRL and right-click on this button, and the tile will appear. At this time, hover the mouse over the newly added engine to display the crawled content.

Add automatic highlighting

If you feel that the above triggering steps are too troublesome, you can continue to add automatic highlighting rules. After adding, hover the mouse over the "Click to join the discussion" button to display the captured content.

Open the configuration page and switch to the "Search within page" tab.

Scroll down to find the site automatic highlighting rules, fill in the rules in {}, and the form will look like:

{
	"/^https://www\\.appinn\\.com/[^/]+/$/": {
	    "words": [
	        "/^https://meta\\.appinn\\.net/t/topic//l$s{unset;color:unset;}$t{$popup(1)}$in{.wpdc-join-discussion}"
	    ]
	}
}

Save the rule.

Among them, /^https://www\\.appinn\\.com/[^/]+/$/ represents that the page URL needs to match a regular expression, and the expression content is ^https://www\\. appinn\\.com/[^/]+/$.

words represents highlighted keywords.

/^https://meta\\.appinn\\.net/t/topic//l$s{unset;color:unset;}$t{$popup(1)}$in{.wpdc-join- discussion} represents:

  1. The target needs to match the regular pattern ^https://meta\\.appinn\\.net/t/topic/
  2. The target needs to be a link (l)
  3. The target will add the style background:unset;color:unset;
  4. It will pop up automatically on the target ($t)
  5. The pop-up content is the first engine containing showTips in the corresponding group ($popup(1))
  6. Find the target only within the element .wpdc-join-discussion ($in)