html链接regard,holmes/index.html at gh-pages · Haroenv/holmes · GitHub

Holmes

Holmes

Holmes Logo

Fast and easy searching inside a page.

$ yarn add holmes.js

holmes({

find: '.results blockquote'

});

more options and full documentation

‘My name is Sherlock Holmes. It is my business to know what other people don’t know.’

— The Adventure of the Blue Carbuncle

‘I am the last and highest court of appeal in detection.’

— The Sign of Four Chapter 1: “The Science of Deduction”

‘There is nothing like first-hand evidence.’

— A Study in Scarlet

“The world is full of obvious things which nobody by any chance ever observes.”

— The Hound of the Baskervilles Chapter 3: “The Problem”

‘You see, but you do not observe. The distinction is clear.’

— A Scandal in Bohemia

‘It is a capital mistake to theorize before one has data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts.’

— A Scandal in Bohemia

‘I never guess. It is a shocking habit,—destructive to the logical faculty.’

— The Sign of Four Chapter 2: “The Science of Deduction”

‘You know my method. It is founded upon the observation of trifles.’

— The Bascombe Valley Mystery

‘There is nothing more deceptive than an obvious fact.’

— The Bascombe Valley Mystery

“‘Is there any point to which you would wish to draw my attention?’ ‘To the curious incident of the dog in the night-time.’ ‘The dog did nothing in the night-time.’ ‘That was the curious incident,’ remarked Sherlock Holmes.'” Exchange between Inspector Gregory &Sherlock Holmes

— Silver Blaze

‘Eliminate all other factors, and the one which remains must be the truth.’

— The Sign of Four Chapter 1: “The Science of Deduction”

‘How often have I said to you that when you have eliminated the impossible, whatever remains,however improbable, must be the truth?’

— The Sign of Four Chapter 6: “Sherlock Holmes Gives a Demonstration

‘…when you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.’

— The Blanched Soldier

‘It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth.’

— The Beryl Coronet

‘Come, Watson, come!’ he cried. ‘The game is afoot. Not a word! Into your clothes and come!’

— The Adventure of the The Abbey Grange

“Data! Data! Data!” he cried impatiently. “I can’t make bricks without clay.”

— The Adventure of the Copper Beeches

‘I cannot live without brain-work. What else is there to live for?’

— The Sign of Four

‘They say that genius is an infinite capacity for taking pains,’ he remarked with a smile. ‘It’s a very bad definition, but it does apply to detective work.’

— A Study in Scarlet

‘There is nothing new under the sun. It has all been done before.’

— A Study in Scarlet

‘I ought to know by this time that when a fact appears to be opposed to a long train of deductions it invariably proves to be capable of bearing some other interpretation.’

— A Study in Scarlet Chapter 3: “Light in the Darkness”

‘Which is it today,’ I asked, ‘morphine or cocaine?’ He raised his eyes languidly from the old black-leather volume which he had opened. ‘It is cocaine,’ he said, ‘a seven-per-cent solution. Would you like to try it?’ Dr. Watson and

— The Sign of Four Chapter 1: “The Science of Deduction”

‘I never make exceptions. An exception disproves the rule.’

— The Sign of Four Chapter 2: “The Statement of the Case’

Holmes took his revolver from his drawer and slipped it in his pocket. It was clear that he thought that our night’s work might be a serious one. Observation of Dr. Watson

— The Sign of Four Chapter 3: “In Quest of a Solution”

So silent and furtive were his movements, like those of a trained bloodhound picking out a scent, that I could not but think what a terrible criminal he would have made had he turned his energy and sagacity against the law instead of exerting them in its defence. Observation of Dr. Watson

— The Sign of Four Chapter 6: “Sherlock Holmes Gives a Demonstration”

‘I listen to their story, they listen to my comments, and then I pocket my fee.’

— A Study in Scarlet Chapter 2: “The Science of Deduction”

‘What one man can invent another can discover.’

— The Adventure of the Dancing Man

‘The emotional qualities are atagonistic to clear reasoning.’

— The Sign of Four

‘I think that there are certain crimes which the law cannot touch, and which therefore, to some extent, justify private revenge.’

— The Adventure of Charles Augustus Milverton

‘What object is served by this circle of misery and violence and fear? It must tend to some end, or else our universe is ruled by chance, which is unthinkable.’

— The Cardboard Box

When I glanced again his face had resumed that red-Indian composure which had made so many regard him as a machine rather than a man. Dr. Watson Observing Sherlock Holmes

— The Crooked Man

‘Having gathered these facts, Watson, I smoked several pipes over them, trying to separate those which were crucial from others which were merely incidental.’

— The Crooked Man

He [Holmes] loved to lie in the very centre of five millions of people, with his filaments stretching out and running through them, responsive to every little rumor or suspicion of unsolved crime. Dr. Watson’s Observation of Sherlock Holmes

— The Resident Patient

‘My mind is like a racing engine, tearing itself to pieces because it is not connected up with the work for which it was built.’

— The Man with the Twisted Lip

“My mind,” he said, “rebels at stagnation. Give me problems, give me work, give me the most abstruse cryptogram or the most intricate analysis, and I am in my own proper atmosphere. I can dispense then with artificial stimulants. But I abhor the dull routine of existence. I crave for mental exaltation. That is why I have chosen my own particular profession,—or rather created it, for I am the only one in the world.”

— The Sign of Four Chapter 1: “The Science of Deduction”

‘When a doctor does go wrong, he is the first of criminals. He has the nerve and he has the knowledge.’

— The Adventure of the Speckled Band

‘Nothing clears up a case so much as stating it to another person.’

— Silver Blaze

‘I think that you know me well enough, Watson, to understand that I am by no means a nervous man. At the same time, it is stupidity rather than courage to refuse to recognize danger when it is close upon you.’

— The Final Problem

‘I confess that I have been blind as a mole, but it is better to learn wisdom late than never to learn it at all.’

— The Man with the Twisted Lip

‘A man should keep his little brain attic stocked with all the furniture that he is likely to use, and the rest he can put away in the lumber-room of his library where he can get it if he wants.’

— The Five Orange Pips

‘It has long been an axiom of mine that the little things are infinitely the most important.’

— A Case of Identity

‘It is my belief, Watson, founded upon my experience, that the lowest and vilest alleys in London do not present a more dreadful record of sin than does the smiling and beautiful countryside.’

— The Copper Beeches

share on twitter

Idea by Haroen Viaene - Design by Lucas Bonomi credits - github

// holmes setup

var h = holmes({

input: '.search input',

find: '.results blockquote',

placeholder: '

— No results, my dear Watson. —

',

mark: false,

hiddenAttr: true,

class: {

visible: 'visible',

hidden: 'hidden'

},

onHidden(el) {

console.log('hidden', el);

},

onFound(el) {

console.log('found', el);

},

onInput(el) {

console.log('input', el);

},

onVisible(el) {

console.log('visible', el);

},

onEmpty(el) {

console.log('empty', el);

}

});

// show all of the options

document.getElementById('more').addEventListener('click',function(e){

e.preventDefault();

document.getElementById('full-doc').classList.toggle('hidden');

});

// Toggle clicked class

var actions = document.querySelectorAll('[data-tooltip]');

for (var i = 0; i < actions.length; i++ ) {

actions[i].addEventListener('click', function() {

if (this.classList.contains('clicked')) {

this.classList.remove('clicked')

} else {

this.classList.add('clicked')

}

})

}

// toggle for showing hidden elements

document.querySelector('.visible').addEventListener('click', function(e) {

document.querySelector('.results').classList.toggle('classes');

});

document.querySelector('.mark').addEventListener('click',function(){

h.stop().then(function(){

h.options.mark = !h.options.mark;

h.start();

// hack to make it run at button click

h.input.dispatchEvent(new Event('input'));

})

});

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值