Git Product home page Git Product logo

new-tab-page's Introduction

startpage

example screenshot

example screenshot expanded


Usage

The easiest way to make changes is by editing config.json and index.html.

Essential options are changed in the files config.json, links.js and commands.js


###### JSON Bool | attribute | Description | | ------------ | :--------------------------------------------------: | | borders | if true, enables borders on top and bottom | | alwaysopen | if true, makes all squares open on load | | mascot | if true, enables image in the bottom right hand corner | | uppercase | if true, makes all text in cells to be uppercase | | background | directory to background file | | opacity | opacity of background layer | | title | tab title | | command_prefix | prefix used to enter subcommands | | useLinkJs | Use js files to create elements (default on)|
background_type
background_type description
mp4 mp4 video file
webm webm video file
ogg ogg video file
clr colour value
img image file (default)

ref can take either an URL or the path to a local image.


Adding links
JS

To add/remove a square, open links.js and copy/create a new section of code and name it's parameters correctly for example

blockArr.push({
	title:			"content", //Title Name
	type:			"link", //Type of block
	num:			"1" //Order Placement
});

There are two types of blocks, link and search. Only one block can have proper search functionality/style.

To add links to the block, copy/create a new section of code and name it's parameters correctly. for example

linksArr.push({
	name:			"/a/", //Title Name
	href:			"http://boards.4chan.org/a/", //destination
    lang:			"", //Language (Optional)
	media:			[[]], //Media (Optional)
	rel:			[[]], //rel (Optional)
	block:			1 //Block to appear in
});
HTML

To add/remove a square just add/remove a div .sqr within div #cell.
Keep the structure like this:

<div class="sqr">
    <span>HEADING</span>
    <div class="content">
        <a href="URL">LINK TITLE</a><br>
        <a href="URL">LINK TITLE</a><br>
        ...
        <a href="URL">LINK TITLE</a>
    </div>
</div>

###### search ``` -h open search help (-- and /? are also accepted) -g google -b bing -y youtube -d duckduckgo -n niconico -p pixiv gt github -w wikipedia go direct url ```
commands
>>        open command help
>>df      define (google)
>>qr      scan qr
>>ri      reverse image

The following example will search for github using DuckDuckGo:

-d github

If an invalid search option or none at all is specified, The first entry in the search array is used. For danbooru, use underscores (_) for tags with more than one word and separate multiple tags with space (e.g.: school_uniform 1girl).

adding commands

There are three types of commands, search commands, subcommands and help commands (which open menus listing commands)

searchArr.push({
	name:			"google", //Name of search
	command:		"-g", //comand
	url: 			"https://www.google.com/#q=", //url to query page
	replaceChars: 	[[" ", "_"]], //Charcters to replace in url
	bmPrefix:		"https://www.google.com/#q=" //Prefix used on bookmarks, makes sence on diverse networks
	bookmark:		[["hideki kamiya", "神谷英樹"]] //Multi-Dimensional array of bookmarks
});
commandArr.push({
	name:			"scan qr", //Name of command
	command:		"qr", //comand
	url: 			"http://zxing.org/w/decode?u=", //url to destination
	replaceChars: 	[[]], //Charcters to replace
	bmPrefix:		"" //Prefix used on bookmark
	bookmark:		[[]] Multi-Dimensional array of bookmarks
});

More character replacements can be used with more arrays or for bookmark entries

[["_"," "],["%20"," "]]
adding bookmark

Bookmarks are preset queries that can be used to go to a direct url from a simple term. These are checked for last, and are not triggered if a search/command has been triggered

bookArr.push({
	command:		"github",
	url:			"https://github.com/"
})

TODO

  • Cleanup Code
  • Optimise
  • Consider using objects instead of arrays for config so that they can be more easily implemented
  • Finish or scrap verbosity (Might remove it in favour of web debugger)

Master: https://github.com/yukisuki/startpage Fork: https://github.com/Scrxtchy/startpage

new-tab-page's People

Contributors

etacarinaea avatar cazzar avatar yukisuki avatar scrxtchy avatar zelpa avatar

Stargazers

Jerzerak avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.