dsample/mobilebarcoder — pull request #4 by Sophira (2014-06-12 20:32:30+00:00)
Title: Reduce code duplication for context menu items

The current getBarcodeFromLink/getBarcodeFromSelection functions actually open new tabs rather than returning information, and there is duplication of code between the get*/show* functions.

1. Rename getBarcodeFromSelection to openBarcodeFromSelection
2. Rename getBarcodeFromLink to openBarcodeFromLink
3. Add new functions for getBarcodeURLFromSelection and getBarcodeURLFromLink
4. Use the new functions in the open*/show* functions instead of having duplicated code