Commit bf036583 authored by Alexei's avatar Alexei

Add project files

parent 5b60e2f1
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}\\main.js",
"stopOnEntry": false,
"args": [],
"cwd": "${workspaceRoot}",
"runtimeExecutable": null,
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"externalConsole": false,
"sourceMaps": false,
"outDir": null
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858,
"sourceMaps": false,
"outDir": null,
"localRoot": "${workspaceRoot}",
"remoteRoot": null
}
]
}
\ No newline at end of file
// Available variables which can be used inside of strings.
// ${workspaceRoot}: the root folder of the team
// ${file}: the current opened file
// ${fileBasename}: the current opened file's basename
// ${fileDirname}: the current opened file's dirname
// ${fileExtname}: the current opened file's extension
// ${cwd}: the current working directory of the spawned process
// A task runner that calls the Typescript compiler (tsc) and
// Compiles a HelloWorld.ts program
{
"version": "0.1.0",
// The command is tsc. Assumes that tsc has been installed using npm install -g typescript
"command": "npm",
// The command is a shell script
"isShellCommand": true,
// Show the output window only if unrecognized errors occur.
"showOutput": "always",
// args is the HelloWorld program to compile.
"args": ["run", "start"],
}
// A task runner that calls the Typescript compiler (tsc) and
// compiles based on a tsconfig.json file that is present in
// the root of the folder open in VSCode
/*
{
"version": "0.1.0",
// The command is tsc. Assumes that tsc has been installed using npm install -g typescript
"command": "tsc",
// The command is a shell script
"isShellCommand": true,
// Show the output window only if unrecognized errors occur.
"showOutput": "silent",
// Tell the tsc compiler to use the tsconfig.json from the open folder.
"args": ["-p", "."],
// use the standard tsc problem matcher to find compile problems
// in the output.
"problemMatcher": "$tsc"
}
*/
// A task runner configuration for gulp. Gulp provides a less task
// which compiles less to css.
/*
{
"version": "0.1.0",
"command": "gulp",
"isShellCommand": true,
"tasks": [
{
"taskName": "less",
// Make this the default build command.
"isBuildCommand": true,
// Show the output window only if unrecognized errors occur.
"showOutput": "silent",
// Use the standard less compilation problem matcher.
"problemMatcher": "$lessCompile"
}
]
}
*/
// Uncomment the following section to use jake to build a workspace
// cloned from https://github.com/Microsoft/TypeScript.git
/*
{
"version": "0.1.0",
// Task runner is jake
"command": "jake",
// Need to be executed in shell / cmd
"isShellCommand": true,
"showOutput": "silent",
"tasks": [
{
// TS build command is local.
"taskName": "local",
// Make this the default build command.
"isBuildCommand": true,
// Show the output window only if unrecognized errors occur.
"showOutput": "silent",
// Use the redefined Typescript output problem matcher.
"problemMatcher": [
"$tsc"
]
}
]
}
*/
// Uncomment the section below to use msbuild and generate problems
// for csc, cpp, tsc and vb. The configuration assumes that msbuild
// is available on the path and a solution file exists in the
// workspace folder root.
/*
{
"version": "0.1.0",
"command": "msbuild",
"args": [
// Ask msbuild to generate full paths for file names.
"/property:GenerateFullPaths=true"
],
"taskSelector": "/t:",
"showOutput": "silent",
"tasks": [
{
"taskName": "build",
// Show the output window only if unrecognized errors occur.
"showOutput": "silent",
// Use the standard MS compiler pattern to detect errors, warnings
// and infos in the output.
"problemMatcher": "$msCompile"
}
]
}
*/
// Uncomment the following section to use msbuild which compiles Typescript
// and less files.
/*
{
"version": "0.1.0",
"command": "msbuild",
"args": [
// Ask msbuild to generate full paths for file names.
"/property:GenerateFullPaths=true"
],
"taskSelector": "/t:",
"showOutput": "silent",
"tasks": [
{
"taskName": "build",
// Show the output window only if unrecognized errors occur.
"showOutput": "silent",
// Use the standard MS compiler pattern to detect errors, warnings
// and infos in the output.
"problemMatcher": [
"$msCompile",
"$lessCompile"
]
}
]
}
*/
// A task runner example that defines a problemMatcher inline instead of using
// a predefined one.
/*
{
"version": "0.1.0",
"command": "tsc",
"isShellCommand": true,
"args": ["HelloWorld.ts"],
"showOutput": "silent",
"problemMatcher": {
// The problem is owned by the typescript language service. Ensure that the problems
// are merged with problems produced by Visual Studio's language service.
"owner": "typescript",
// The file name for reported problems is relative to the current working directory.
"fileLocation": ["relative", "${cwd}"],
// The actual pattern to match problems in the output.
"pattern": {
// The regular expression. Matches HelloWorld.ts(2,10): error TS2339: Property 'logg' does not exist on type 'Console'.
"regexp": "^([^\\s].*)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\):\\s+(error|warning|info)\\s+(TS\\d+)\\s*:\\s*(.*)$",
// The match group that denotes the file containing the problem.
"file": 1,
// The match group that denotes the problem location.
"location": 2,
// The match group that denotes the problem's severity. Can be omitted.
"severity": 3,
// The match group that denotes the problem code. Can be omitted.
"code": 4,
// The match group that denotes the problem's message.
"message": 5
}
}
}
*/
\ No newline at end of file
.tweet .noticeAuthor {
padding-left: 5px;
}
.tweet .notice {
padding-left: 55px;
}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel='stylesheet' href='css/main.css' type='text/css'>
<title>QvitterJS</title>
</head>
<body>
<script>
var fs = require('fs'),
xml2js = require('xml2js'),
$ = require('jquery');
var parseString = require('xml2js').parseString;
var apiUrl = null;
var GSInstance = {
fancyLink: 0,
language: '',
email: '',
closed: 0,
inviteOnly: 0,
private: 0,
textLimit: 0,
ssl: ''
};
$.get('https://quitter.se/rsd.xml', function (data) {
parseString(data, function (e, r) {
var apis = r.rsd.service[0].apis;
for (var i = 0; i < apis.length; i++) {
var api = apis[i].api[i]['$'];
console.log(api);
if (api.name === "Twitter") {
apiUrl = api.apiLink;
}
}
});
}, "text").done(function () {
getServerConfig();
});
function getServerConfig() {
$.getJSON(apiUrl + 'statusnet/config.json', function (data) {
var site = data.site;
GSInstance.fancyLink = site.fancy;
GSInstance.language = site.language;
GSInstance.email = site.email;
GSInstance.closed = site.closed;
GSInstance.inviteOnly = site.inviteonly;
GSInstance.private = site.private;
GSInstance.textLimit = site.textlimit;
GSInstance.ssl = site.ssl;
}).done(function () {
console.log(GSInstance);
loadPublicTimeline();
});
}
function loadPublicTimeline() {
$.getJSON(apiUrl + 'statuses/public_timeline.json', function (data) {
for (var i = 0; i < data.length; i++) {
var user = data[i].user;
var tweet = document.createElement('div');
tweet.id = 'tweet';
tweet.className = 'tweet';
var author = document.createElement('span');
author.id = 'author';
author.className = 'noticeAuthor';
var authorLink = document.createElement('a');
authorLink.text = user.name + ' @' + user.screen_name;
authorLink.href = user['statusnet:profile_url'];
authorLink.onclick = function() { window.open(authorLink.href, authorLink.text); };
author.appendChild(authorLink);
var avatarImage = document.createElement('img');
avatarImage.height = 48;
avatarImage.width = 48;
avatarImage.src = user.profile_image_url_https;
avatarImage.align = 'left';
avatarImage.className = 'authorAvatar';
var notice = document.createElement('p');
notice.id = 'notice';
notice.innerHTML = data[i].statusnet_html;
notice.className = 'notice';
tweet.appendChild(author);
tweet.appendChild(avatarImage);
tweet.appendChild(notice);
document.getElementById('tweets').appendChild(tweet);
document.getElementById('tweets').appendChild(document.createElement('br'));
}
});
}
</script>
<div id="tweets">
<!--<div class="tweet">
<span>Con A @demoakracia</span>
<img width="96" height="96" src="https://quitter.es/avatar/10455-96-20150829173033.jpeg" align="left">
<p>@jagascon@quitter.es Dejalos libres, que se emparejen con quien quieran y lleva uno de cada color, mola más y crearás tendencia XD</p>
<span class="info">2 minutes ago in reply to @jagascon via Qvitter</span>
</div>-->
</div>
</body>
</html>
\ No newline at end of file
'use strict';
const electron = require('electron');
// Module to control application life.
const app = electron.app;
// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow;
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let mainWindow;
function createWindow () {
// Create the browser window.
mainWindow = new BrowserWindow({width: 800, height: 600});
// and load the index.html of the app.
mainWindow.loadURL('file://' + __dirname + '/html/index.html');
// Open the DevTools.
mainWindow.webContents.openDevTools();
// Emitted when the window is closed.
mainWindow.on('closed', function() {
// Dereference the window object, usually you would store windows
// in an array if your app supports multi windows, this is the time
// when you should delete the corresponding element.
mainWindow = null;
});
}
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
app.on('ready', createWindow);
// Quit when all windows are closed.
app.on('window-all-closed', function () {
// On OS X it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== 'darwin') {
app.quit();
}
});
app.on('activate', function () {
// On OS X it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (mainWindow === null) {
createWindow();
}
});
{
"name": "qvitter-js",
"version": "0.0.1",
"description": "GNUsocial client written in Javascript",
"main": "main.js",
"scripts": {
"start": "electron main.js"
},
"author": "Alexei Ivanov",
"license": "GPL-3.0",
"devDependencies": {
"electron-prebuilt": "^0.36.7",
"jquery": "^2.2.0",
"xml2js": "^0.4.16"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment